* msOGRGeometryToShape() * * Utility function to convert from OGR geometry to a mapserver shape * object. **********************************************************************/
| 472 | * object. |
| 473 | **********************************************************************/ |
| 474 | int 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 | /* ================================================================== |
no test coverage detected