[gdal-dev] OGR functionality to remove holes?

Stephen Woodbridge woodbri at swoodbridge.com
Mon Jan 20 13:46:09 PST 2014


On 1/20/2014 3:56 PM, Even Rouault wrote:
> Le lundi 20 janvier 2014 21:48:12, xavier lhomme a écrit :
>> 3D engine doesn't like hole in a polygone.
>>   A way to render such polygon is to link the outer ring and the inner ring.
>> (But it's better to use tesselation.)
>
> Ah right tesselation would do it.
>
>>
>> for example if you have a rectangle ABCD and a triangle describing the hole
>> ( EFG) , you can create a polygone ABCDAEFGA

Actually, I think this would be ABCDAEFGEA and that assumes the the edge 
AE does not intersect any other boundary.

> Yes, but such description isn't compliant with OGC geometries.

Right, but there was a lot of software around that used this convention 
prior to OGC that people still have to deal with. If this is important 
enough, I suspect that it would be possible to create an format driver 
that could convert between this and OGC formats, Or to write a script 
that could convert these to the format needed.

-Steve

>>
>> It's how I understand the question. I don't think you will find such
>> function in GEOS (or JTS)
>>
>>
>> 2014/1/20 Even Rouault <even.rouault at mines-paris.org>
>>
>>> Le lundi 20 janvier 2014 21:27:18, agerrius a écrit :
>>>> Hi all,
>>>>
>>>> Does OGR have any build in functionality to convert features with holes
>>>> into features without holes? I don't mean delete the inner rings, but
>>>> change the geometry so that it covers the same area with only the outer
>>>> ring.
>>>
>>> I'm afraid not to understand what you mean. What is the difference
>>> between deleting inner rings and "changing the geometry so that it
>>> covers the same area with only the outer ring" ?
>>>
>>> There's no one-line invocation for such functionnality. But it can be
>>> done with the OGR API and a few dozains lines of code.
>>>
>>>> I know GlobalMapper has such a function, but it would be useful if I
>>>
>>> could
>>>
>>>> perform it in my code directly with the OGR library.
>>>>
>>>> Thanks,
>>>>
>>>> Arno
>>>>
>>>>
>>>>
>>>> --
>>>
>>>> View this message in context:
>>> http://osgeo-org.1560.x6.nabble.com/OGR-functionality-to-remove-holes-tp5
>>> 0
>>>
>>>> 99099.html Sent from the GDAL - Dev mailing list archive at Nabble.com.
>>>> _______________________________________________
>>>> gdal-dev mailing list
>>>> gdal-dev at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>
>>> --
>>> Geospatial professional services
>>> http://even.rouault.free.fr/services.html
>>> _______________________________________________
>>> gdal-dev mailing list
>>> gdal-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



More information about the gdal-dev mailing list