MCPcopy Create free account
hub / github.com/MapServer/MapServer / msOGRGeometryToShape

Function msOGRGeometryToShape

mapogr.cpp:474–490  ·  view source on GitHub ↗

* msOGRGeometryToShape() * * Utility function to convert from OGR geometry to a mapserver shape * object. **********************************************************************/

Source from the content-addressed store, hash-verified

472 * object.
473 **********************************************************************/
474int msOGRGeometryToShape(OGRGeometryH hGeometry, shapeObj *psShape,
475 OGRwkbGeometryType nType)
476{
477 if (hGeometry && psShape && nType > 0)
478 {
479 if (nType == wkbPoint || nType == wkbMultiPoint )
480 return ogrConvertGeometry(hGeometry, psShape, MS_LAYER_POINT);
481 else if (nType == wkbLineString || nType == wkbMultiLineString)
482 return ogrConvertGeometry(hGeometry, psShape, MS_LAYER_LINE);
483 else if (nType == wkbPolygon || nType == wkbMultiPolygon)
484 return ogrConvertGeometry(hGeometry, psShape, MS_LAYER_POLYGON);
485 else
486 return MS_FAILURE;
487 }
488 else
489 return MS_FAILURE;
490}
491
492
493/* ==================================================================

Callers 2

FLTogrConvertGeometryFunction · 0.85
msOGRShapeFromWKTFunction · 0.85

Calls 1

ogrConvertGeometryFunction · 0.85

Tested by

no test coverage detected