[MS4W-Users] PHP and OGR_G_CreateFromWkt
Yewondwossen Assefa
yassefa at dmsolutions.ca
Fri Mar 12 08:03:54 EST 2010
Hi Brent,
http://bugzilla.maptools.org/show_bug.cgi?id=2166 is the bug referencing it.
There is a new php_ogr.dll attached to this bug until it becomes official in the next release.
Note that you also need to initialize $hGeometry before calling the function:
...
$hGeometry= null
OGR_G_CreateFromWkt(...
best regards,
Brent Fraser wrote:
> I can't seem to get OGR_G_CreateFromWkt to work in PHP. The code below gives an
> OGRError value of 6 (OGRERR_FAILURE).
>
>
> <?php
> if (extension_loaded("ogr")) {
> $geometryValue = "LINESTRING(0 0, 0 10)";
> $ogrError = OGR_G_CreateFromWkt( $geometryValue, NULL, $hGeometry );
> if($hGeometry == NULL) {
> print "Unable to create geometry. OGRErr=".$ogrError.",
> WKT='".$geometryValue."'\n";
> if ($hDS) OGR_DS_Destroy($hDS);
> die;
> }
> }
> ?>
>
> Has anybody used OGR_G_CreateFromWkt in PHP?
>
> Thanks!
> Brent Fraser
>
> _______________________________________________
> MS4W-Users mailing list
> MS4W-Users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ms4w-users
>
>
--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst
Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/
Phone: (613) 565-5056 (ext 14)
Fax: (613) 565-0925
----------------------------------------------------------------
More information about the MS4W-Users
mailing list