GEOS and polygons with holes or multipolygons

classic Classic list List threaded Threaded
2 messages Options
B B
Reply | Threaded
Open this post in threaded view
|

GEOS and polygons with holes or multipolygons

B B
It looks like ossimPolyArea2d allows for the possibility of the geometry it holds to have holes in it, but it doesn't look like there is a way to assign it a polygon that has holes in it. It looks like the only way that it could get a hole is if it came from a boolean operation.

It doesn't look like OSSIM has a type that allows multiple parts, or holes. I swore there was an ossimMultiPolygon type. Or have I missed it?

The shapefiles that we have are structured like this:

-----
shape1 (e.g. a country)
part1-exterior boundary (clockwise) (e.g. a state)
part2-exterior boundary (clockwise) (e.g. another state)
part3-interior boundary (counter-clockwise) (e.g. a lake in the above state)
-----
shape2
part1-exterior boundary (clockwise)
-----
shape3
part1-exterior boundary (clockwise)
part2-interior boundary (counter-clockwise)
part3-exterior boundary (clockwise)
part4-exterior boundary (clockwise)
-----
etc

.........

Is there a way to load these into a datatype that I'm missing? It looks like GEOS has support, but there just isn't a way to access it through ossimPolyArea2d. Do you have suggestions on how I should proceed? I was thinking that I'd add a constructor for ossimPolyArea2d that could take a list of exterior boundary polygons and a list of interior boundaries.

Thanks!



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer
Reply | Threaded
Open this post in threaded view
|

Re: GEOS and polygons with holes or multipolygons

David Burken
Hi Bryan,

You might look at ossimGeoPolygon.  That's what's used under the hood for the polygon remapper exposed in ossim-geocell.  You can have multiple remaps in that.  Not sure if it's what you need though.  Key classes:
PolygonRemapperDialog
ossimGeoPolyCutter
ossimGeoPolygon

Hope that helps,
Dave


On 12/9/14, 9:58 PM, Bryan Bagnall wrote:
It looks like ossimPolyArea2d allows for the possibility of the geometry it holds to have holes in it, but it doesn't look like there is a way to assign it a polygon that has holes in it. It looks like the only way that it could get a hole is if it came from a boolean operation.

It doesn't look like OSSIM has a type that allows multiple parts, or holes. I swore there was an ossimMultiPolygon type. Or have I missed it?

The shapefiles that we have are structured like this:

-----
shape1 (e.g. a country)
part1-exterior boundary (clockwise) (e.g. a state)
part2-exterior boundary (clockwise) (e.g. another state)
part3-interior boundary (counter-clockwise) (e.g. a lake in the above state)
-----
shape2
part1-exterior boundary (clockwise)
-----
shape3
part1-exterior boundary (clockwise)
part2-interior boundary (counter-clockwise)
part3-exterior boundary (clockwise)
part4-exterior boundary (clockwise)
-----
etc

.........

Is there a way to load these into a datatype that I'm missing? It looks like GEOS has support, but there just isn't a way to access it through ossimPolyArea2d. Do you have suggestions on how I should proceed? I was thinking that I'd add a constructor for ossimPolyArea2d that could take a list of exterior boundary polygons and a list of interior boundaries.

Thanks!




------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk


_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer