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.<br>
<br>-Josh<br><br><div class="gmail_quote">On Mon, Feb 20, 2012 at 2:24 PM, yvecai <span dir="ltr"><<a href="mailto:yvecai@gmail.com">yvecai@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div bgcolor="#ffffff" text="#000000">
Hi all,<br>
It's maybe more a bash question than a Postgis one, but ...<br>
<br>
I'm extracting shapefiles from a SRTM contour lines postgis base,
using WKT multipolygons to cut extract by country.<br>
This gives something like:<br>
<blockquote>pgsql2shp -f shp/my_shapefile.shp -u mapnik contour \<br>
"SELECT
ST_simplify(intersection(way,GeomFromText('$poly',-1)),0.00005),
height \<br>
from contours where \<br>
ST_Intersects(way, GeomFromText('$poly',-1));"<br>
</blockquote>
where $poly is a large WKT (like this one:
<a href="http://pistes-nordiques.org/download/france.wkt" target="_blank">http://pistes-nordiques.org/download/france.wkt</a>).<br>
<br>
I have the following error: /usr/bin/pgsql2shp: Argument list too
long<br>
<br>
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?<br>
<br>
yves<br>
<br>
<br>
</div>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br>