Message Boards Message Boards

Two related questions about GeoGraphics

Posted 1 year ago

(1) Is it possible to get the list of points in Polygon[entity], where entity is some geographic entity with an associated polygon defining its boundaries?

(2) Is there a way to define a geographic region in a way that generalizes GeoDisk? Specifically, a region that lies within, e.g., 50 miles of the city limits of a given city (mathematically, the border of the region is the envelope of the circles centered on the points of the city limits). I could set up an implicit definition using GeoDistance (I think), but would I be able to plot that using GeoGraphics?

Thanks for considering. Ron

POSTED BY: Rongoetz
5 Replies

For (1)

polygon = Entity["City", {"NewYork", "NewYork", "UnitedStates"}]["Polygon"]
points = List @@ First@polygon

For (2), do you mean something like this?

nycPosition = Entity["City", {"NewYork", "NewYork", "UnitedStates"}]["Position"]
GeoGraphics[GeoDisk[nycPosition, Quantity[50, "Miles"]]]

enter image description here

POSTED BY: Rohit Namjoshi

Question (2) may be similar to the concept of "dilation of a region". It has a geographic example in the documentation of RegionDistance.

POSTED BY: Gianluca Gorni
Posted 1 year ago

(1) is exactly what I need. Thank you! I should have come up with that myself.

(2) is more complicated, I think. You have a single disk centered on the position associated with NYC, (presumably a centroid, I imagine). What I want would be the union of all the disks centered on the points on the city limits, i.e., the points you collected in "points" in (1), and all the points along the segments joining those points. It would be easy to write a mathematical description of this set, but I'm not sure how to get it in a form where GeoGraphics can use it.

POSTED BY: Rongoetz
Posted 1 year ago

Thanks, that does look promising. I haven't used that function before, but this definitely gives me something to go on. As long as I can specify the metric (it is non-Euclidean in this case), I can probably work in the latitude-longitude parameter plane with the appropriate metric to find the boundary points of the region.

POSTED BY: Rongoetz

I remember I have done something like that to mark contour lines defined by the distance from a coast. First I map the land onto a sphere in 3D, where I can use EuclideanDistance. From that I define a function of latitude-longitude and make a ContourPlot. Finally I map the contours into GeoGraphics inserting GeoPosition between Line[ and the list of points.

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract