Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update documentation of fill distance for polygons #2360

Open
pedro-andrade-inpe opened this issue Aug 28, 2020 · 3 comments
Open

update documentation of fill distance for polygons #2360

pedro-andrade-inpe opened this issue Aug 28, 2020 · 3 comments
Assignees
Milestone

Comments

@pedro-andrade-inpe
Copy link
Member

The strategy distance for polygons is not clear in the documentation. It says that " The distance is computed from the centroid of the cell to the closest point, line, or border of a polygon." What happens when the centroid is within the polygon?

@avancinirodrigo
Copy link
Contributor

The distance operation considering both centroids.

See it in attached image.
distance

import("gis")

local proj = Project{
	file = "project.qgs",
	clean = true
}
local f1 = filePath("amazonia-limit.shp", "gis")
local f2 = filePath("amazonia-ports.shp", "gis")
f1:copy(currentDir())
f2:copy(currentDir())
local l1 = Layer{
	project = proj,
	name = "limit",
	file = "amazonia-limit.shp"
}
print(l1)
local l2 = Layer{
	project = proj,
	name = "ports",
	file = "amazonia-ports.shp"
}
print(l2)
l1:fill{
	attribute = "dist",
	operation = "distance",
	layer = l2.name
}

@pedro-andrade-inpe
Copy link
Member Author

So it is not to the border of a polygon. Just update this sentence, please.

@avancinirodrigo
Copy link
Contributor

@pedro-andrade-inpe
Actually, it has been changed in #1566.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants