There's no reason technically you can't do it. You will need to hack the loader to ignore the fact that the other files are missing, but shp file alone does contain all the information you need.<div><br>P.<br><br><div class="gmail_quote">
On Wed, Jun 6, 2012 at 10:23 PM, karsten <span dir="ltr"><<a href="mailto:karsten@terragis.net" target="_blank">karsten@terragis.net</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>
<div><font color="#000080" face="Arial"><span>Hi 
All,</span></font></div>
<div><font color="#000080" face="Arial"><span></span></font> </div>
<div><font color="#000080" face="Arial"><span>I am 
working on a data upload function where for a web map a user can upload a shape 
file onto the server, the file will then be loaded via a utility into PostGIS 
e.g. using ogr2ogr or shp2pgsql.</span></font></div>
<div><span><font><font face="Arial"><font color="#000080">Now we all know that <table><tbody><tr><td><span>usually a shape files has at least 3 files shp, shx and dbf 
to be complete... but unusually </span></td></tr><tr><td></td><td><span>- </span><span>well I was 
wondering if it would be possible to only use a shp file alone to load the 
geometry to PostGIS (if it is ok to lose index and attributes) 
</span></td></tr></tbody></table></font></font></font></span></div>
<div><span><font><font face="Arial"><font color="#000080"><span></span></font></font></font></span> </div>
<div><span><font color="#000080" face="Arial">The 
reason is this would have several advantages for the work I am tying to 
do</font></span></div>
<div><span><font color="#000080" face="Arial">1. the 
shape file is user provided (if will be always 'simple' polygon shapes, but due 
to that will always have non consistent attributes (i.e not the same tabel 
schema) which are not needed anyway for the purposes of the 
app</font></span></div>
<div><span><font color="#000080" face="Arial">2. the 
geometry alone will be used to show areas of Interest for the user on the map 
(attributes are not needed, only location and extent 
matters)</font></span></div>
<div><span><font color="#000080" face="Arial">3. 
inconsistencies of differing  attributes will not be a problem if I could 
in fact only import the geometry to PostGIS and simply add a unique gid and user 
id as only default attributes to the PostGIS table</font></span></div>
<div><span>
<div><font><font face="Arial"><font color="#000080"><span><span></span></span></font></font></font> </div>
<div><font><font face="Arial"><font color="#000080"><span><span>A</span><span>ny ideas on that weird idea , 
if that could be accomplished with existing tools without too much trouble 
?</span></span><span> 
</span></font></font></font></div>
<div><span><font color="#000080" face="Arial"></font></span> </div>
<div><span><font color="#000080" face="Arial">Cheers</font></span></div>
<div><span><font color="#000080" face="Arial">Karsten</font></span></div></span></div>
<div><span></span> </div>
<div align="left">
<p class="MsoNormal"><span style="FONT-FAMILY:'Verdana','sans-serif';FONT-SIZE:11pt">Karsten 
Vennemann<br></span><span style="FONT-FAMILY:'Verdana','sans-serif';FONT-SIZE:9pt">Principal<br><br><span style="COLOR:#003264">Terra GIS LTD<br>2119 Boyer Ave E 
<br>Seattle, WA  98112<br>USA <br><a title="blocked::http://www.terragis.net/" href="http://www.terragis.net/" target="_blank"><font color="#0000ff">www.terragis.net</font></a></span></span><u></u><u></u><u></u></p>
<p class="MsoNormal"><span style="FONT-FAMILY:'Verdana','sans-serif';COLOR:#003264;FONT-SIZE:9pt">Phone 
<a href="tel:%2B%2B1%20206%20905%201711" value="+12069051711" target="_blank">++1 206 905 1711</a><br>Fax      ++1 925 905 
1711</span><u></u><u></u></p></div>
<div> </div><br><br><br><br><font face="Tahoma"><br>=======<br>Email scanned by PC Tools - No viruses or spyware found.<br>(Email Guard: 9.0.0.888, Virus/Spyware Database: 6.19830)<br><a href="http://www.pctools.com/?cclick=EmailFooterClean_51" target="_blank">http://www.pctools.com</a><br>
=======</font>
</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></div>