[gdal-dev] OGR read polygon

Chaitanya kumar CH chaitanya.ch at gmail.com
Sun Jan 16 08:00:31 EST 2011


Rashad,

Polygons are made of one or more linear rings. A linear ring can be read
pretty much the same as a linestring.
http://www.gdal.org/ogr/classOGRGeometry.html

On Sun, Jan 16, 2011 at 12:55 PM, Mohammed Rashad <
mohammedrashadkm at gmail.com> wrote:

> but i can read points and lines directly without wkb. problem is in reading
> polygon
> if( poGeometry != NULL
>             && wkbFlatten(poGeometry->getGeometryType()) == wkbLineString
>  )
>         {
>             OGRLineString *poPoint = (OGRLineString *) poGeometry;
>
> for(int i=0;i<poPoint->getNumPoints();i++)
> {
>
> cout << poPoint->getX(i) << "::" << poPoint->getY(i) << endl;
> }
> }
>
> On Sun, Jan 16, 2011 at 12:50 PM, Chaitanya kumar CH <chaitanya.ch@
> gmail.com> wrote:
>
>> Rashad,
>>
>> Refer to http://www.opengeospatial.org/standards/sfa for the official
>> specification.
>> You can use the wkb format for more clarity, but at the cost of more
>> computation.
>>
>> On Sun, Jan 16, 2011 at 11:56 AM, Mohammed Rashad <
>> mohammedrashadkm at gmail.com> wrote:
>>
>>> how to read a polygon from wkbPolygon geometry type. how read its set of
>>> points or points that make up the polygon
>>>
>>> --
>>> Rashad
>>>
>>> _______________________________________________
>>> gdal-dev mailing list
>>> gdal-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>
>>
>>
>>
>> --
>> Best regards,
>> Chaitanya kumar CH.
>> /tʃaɪθənjə/ /kʊmɑr/
>> +91-9494447584
>> 17.2416N 80.1426E
>>
>
>
>
> --
> Rashad
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110116/a874201a/attachment-0001.html


More information about the gdal-dev mailing list