[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    [postgis-users] shp2pgsql using problems
From:       "zhengyong zhang" <shieldly () gmail ! com>
Date:       2008-06-30 8:22:16
Message-ID: d7f039270806300122w63725146q4033edee724287f7 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


when I'm trying to use shp2pgsql to convert a shp file into postgresql.
as I do it using the following commands:
1, shp2pgsql pt_gsqy_point.shp pt_gsqy_point postgis> pt_gsqy_point.sql
2, psql -d postgis -f pt_gsqy_point.sql >log.txt

after I run *the first command*, and I got sql script file:
the content is :
BEGIN;
CREATE TABLE "pt_gsqy_point" (gid serial PRIMARY KEY,
"name" varchar(40));
SELECT AddGeometryColumn('','pt_gsqy_point','the_geom','-1','POINT',2);
INSERT INTO "pt_gsqy_point" ("name",the_geom) VALUES ('the first location
name','010100000085EC6F9141E2C5C0E829EE9F0AC98240');
INSERT INTO "pt_gsqy_point" ("name",the_geom) VALUES ('the second location
name','0101000000CCFE346E05B4C5C0A9A946F9A30D8640');
.....
...
etc...

and after *I run the second command*, in the pgadmin, I got to see the
values
in it. but the geometry values can not be used directly, as the values are
those : '010100000085EC6F9141E2C5C0E829EE9F0AC98240',
anyone in the mailist have used the shp2pgsql.exe???
how to deal with it, so that I can use those point coordinates to do some
operations, such as select a point using the point coordinate to get the
name of it.
thankyou.

yours, shieldy

[Attachment #5 (text/html)]

<div>when I&#39;m trying to use shp2pgsql to convert a shp file into \
postgresql.<br>as I do it using the following commands:<br>1, shp2pgsql \
pt_gsqy_point.shp pt_gsqy_point postgis&gt; pt_gsqy_point.sql<br>2, psql -d postgis \
-f pt_gsqy_point.sql &gt;log.txt</div>

<div><br>after I run <strong>the first command</strong>, and I got sql script \
file:<br>the content is :<br>BEGIN;<br>CREATE TABLE &quot;pt_gsqy_point&quot; (gid \
serial PRIMARY KEY,<br>&quot;name&quot; varchar(40));<br>SELECT \
AddGeometryColumn(&#39;&#39;,&#39;pt_gsqy_point&#39;,&#39;the_geom&#39;,&#39;-1&#39;,&#39;POINT&#39;,2);<br>
 INSERT INTO &quot;pt_gsqy_point&quot; (&quot;name&quot;,the_geom) VALUES (&#39;the \
first location name&#39;,&#39;010100000085EC6F9141E2C5C0E829EE9F0AC98240&#39;);<br>INSERT \
INTO &quot;pt_gsqy_point&quot; (&quot;name&quot;,the_geom) VALUES (&#39;the second \
                location \
                name&#39;,&#39;0101000000CCFE346E05B4C5C0A9A946F9A30D8640&#39;);<br>
.....<br>...<br>etc...<br><br>and after <strong>I run the second command</strong>, in \
the pgadmin, I got to see the values<br>in it. but the geometry values can not be \
used directly, as the values are<br>those : \
&#39;010100000085EC6F9141E2C5C0E829EE9F0AC98240&#39;,<br> anyone in the mailist have \
used the shp2pgsql.exe???<br>how to deal with it, so that I can use those point \
coordinates to do some<br>operations, such as select a point using the point \
coordinate to get the<br>name of it.<br> </div>
<div>thankyou.</div>
<div>&nbsp;</div>
<div>yours, shieldy<br><br><br clear="all"><br></div>



_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic