[postgis-users] Fixed limits on text functions in PostGIS?

Michael Fuhr mike at fuhr.org
Mon Jun 18 17:49:05 PDT 2007


On Mon, Jun 18, 2007 at 05:04:50PM -0600, Bruce Rindahl wrote:
> I have a geometry loaded into PostGIS as a multipolygon with multiple rings
> and lots of vertexes.  I can use most of the functions on the geometry such
> as area, centroid, intersection, etc. with no problem but all the text type
> functions return null.  For example asText, asKml, asSVG, asBinary all
> return null.  Again this I a very complex polygon with lots of rings.  Is
> there a built in limit the geometry is exceeding when processing these
> functions?  A SQL command to load one record into a table (created by
> shp2sql) called floodplain6 is located at:
> http://www.lrcwe-data.com/floodplain6.sql

Works here with psql in PostgreSQL 8.2.4 / PostGIS 1.2.2SVN.  How
are you determining that the functions return null?  Are you testing
their output with IS NULL in SQL or are you examining the value
that some client application returns?  Have you tried looking at
the output in psql (you might wish to save the output to a file
with \o or redirection)?

select length(astext(the_geom)) as text_length,
       length(askml(the_geom)) as kml_length,
       length(asgml(the_geom)) as gml_length,
       length(assvg(the_geom)) as svg_length,
       length(asbinary(the_geom)) as binary_length
  from floodplain6;

 text_length | kml_length | gml_length | svg_length | binary_length 
-------------+------------+------------+------------+---------------
      108998 |     195947 |     111547 |     114164 |         83162
(1 row)

-- 
Michael Fuhr



More information about the postgis-users mailing list