3

I am trying to write a simple procedure to find the percentage of a large property falls in each surrounding ZIP code. A problem that I am encountering is the fact that RegionIntegration[] and Area[] does not seem to work with regions that contain GeoPosition values.

tmp = Polygon[GeoPosition[{{{39.191046`, -78.198858`}, {39.191161`, -78.196945`}, {39.204733`, -78.187792`}, {39.198913`, -78.163766`}}}]];
tmp2 = Polygon[{{{39.191046`, -78.198858`}, {39.191161`, -78.196945`}, {39.204733`, -78.187792`}, {39.198913`, -78.163766`}}}];

Area[tmp] (*Area::reg: "Polygon[GeoPosition[{{{39.191,-78.1989},{39.1912,-78.1969},{39.2047,-78.1878},{39.1989,-78.1638}}}]] is not a correctly specified region." *)
Area[tmp2] (*.000184847*) (* I know that this number is meaningless without units but I am using it to get the percentage of an region is in the intersection of another region so it can be used in this case.*) 

I know that for this example I could simply remove the tag with:

tmp[[1]] = tmp[[1]][[1]]

This encounters problems when there is a filled curve containing multiple lines. It should be fairly straight forwards to handle this issue but I can't help but think that I must be missing something.

Does anyone have any guidance? I am new to mathematica. Sorry if this is a dumb question.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574

0 Answers0