In my opinion this should work:

        SELECT ST_AsGeoJson(ST_MakePoint(1,2))
or:   SELECT ST_AsGeoJson(ST_MakePoint(1,2)::geometry)

however, it produces:
--------------
ERROR:  function st_asgeojson(geometry) is not unique
LINE 1: SELECT ST_AsGeoJson(ST_MakePoint(1,2))
               ^
HINT: Could not choose a best candidate function. You might need to add explicit type casts.
--------------

This does work:
    SELECT ST_AsGeoJson(ST_MakePoint(1,2),0,0)

My postgis version:
"POSTGIS="2.0.1 r9979" GEOS="3.3.5-CAPI-1.7.5" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.1, released 2012/05/15" LIBXML="2.7.8" TOPOLOGY RASTER"
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to