<div>Thanks, I thought of that. But that leaves me with the trouble of removing it afterwards in the shapefile and the table each time I export a table that happens to be empty at the time. I do need an exact match with the number of rows in the database. </div>

<div>It would have been nice to produce the shapefile in one step, but maybe taking the extra steps is the only way. </div>
<div><br>Joukje</div>
<div> </div>
<div class="gmail_quote">On Fri, Feb 20, 2009 at 2:14 PM, Eduin Yezid Carrillo Vega <span dir="ltr"><<a href="mailto:yecarrillo@gmail.com" target="_blank">yecarrillo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Try adding a fake row.<br><br><br>Eduin Yesid Carrillo Vega<br>Ingeniero Civil, Esp. Sistemas de Información Geográfica<br>
Centro de Investigación y Desarrollo en Información Geográfica<br>Instituto Geográfico Agustín Codazzi - IGAC<br>Cr 30 48-51<br>Tel +57 1 3694000  ext 4603<br>Bogotá D.C., Colombia<br>
<div>
<div></div>
<div><br><br><br>On Fri, Feb 20, 2009 at 6:14 AM, Joukje Aris <<a href="mailto:joukje.aris@gmail.com" target="_blank">joukje.aris@gmail.com</a>> wrote:<br>> Hello list,<br>><br>> Does anyone know if it is possible to export an empty PostGIS table or view<br>
> with no rows to a valid shapefile?<br>><br>> When exporting a table or view with no rows in it, pgsql2shp returns "ERROR:<br>> Cannot determine geometry type (empty table).". With ogr2ogr there is no<br>
> error message, but no shapefile either. I would like to extract the data<br>> structure of the table into an empty shapefile, compared with the -p option<br>> in shp2pgsql.<br>><br>> Any ideas would be appreciated.<br>
> Joukje<br></div></div>> _______________________________________________<br>> postgis-users mailing list<br>> <a href="mailto:postgis-users@postgis.refractions.net" target="_blank">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>><br>_______________________________________________<br>
postgis-users mailing list<br><a href="mailto:postgis-users@postgis.refractions.net" target="_blank">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>
</blockquote></div><br>