On 11-01-21 12:47 PM, Mohammed Rashad wrote:
OGRGeometry *OLGeometry;
char *geom = "POINT(6 10)";
OLGeometry->importFromWkt(&geom);
}
Rashad,
The problem is that OLGeometry is an unitialized pointer as opposed to
being a valid geometry object on which a method could be invoked.
I would suggest changing this to:
OGRGeometry *OLGeometry = NULL;
char *geom = "POINT(6 10)";
OGRGeometryFactory::createFromWkt( &geom, NULL, &OLGeometry );
Note that the documentation on OGRGeometry::importFromWkt() says:
* The object must have already been instantiated as the correct derived
* type of geometry object to match the text type. This method is used
* by the OGRGeometryFactory class, but not normally called by application
* code.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev