[postgis-users] Large WKT from file

Josh Jordan joshjordan at robotjosh.com
Mon Feb 20 12:30:06 PST 2012


I fixed an issue like that before by looking where that error message comes
from in the source and finding a buffer to increase.  My issue was a query
that had too many chars in it and increasing a buffer size inside pgsql2shp
fixed it.

-Josh

On Mon, Feb 20, 2012 at 2:24 PM, yvecai <yvecai at gmail.com> wrote:

> **
> Hi all,
> It's maybe more a bash question than a Postgis one, but ...
>
> I'm extracting shapefiles from a SRTM contour lines postgis base, using
> WKT multipolygons to cut extract by country.
> This gives something like:
>
> pgsql2shp -f shp/my_shapefile.shp -u mapnik contour \
> "SELECT ST_simplify(intersection(way,GeomFromText('$poly',-1)),0.00005),
> height \
> from contours where \
> ST_Intersects(way, GeomFromText('$poly',-1));"
>
> where $poly is a large WKT (like this one:
> http://pistes-nordiques.org/download/france.wkt).
>
> I have the following error: /usr/bin/pgsql2shp: Argument list too long
>
> I played a little with xargs, but with no success. Is there a way to load
> the wkt from a file with postgres, or something else?
>
> yves
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120220/0a746e04/attachment.html>


More information about the postgis-users mailing list