[postgis-users] Re: shp2pgsql using problems

zhengyong zhang shieldly at gmail.com
Wed Jul 2 02:18:27 PDT 2008


David,
   thanku,it works.
---zhang
Date: Tue, 01 Jul 2008 09:30:42 +0200
From: Jean David TECHER <david.techer at davidgis.fr>
Subject: Re: [postgis-users] shp2pgsql using problems
To: postgis-users at postgis.refractions.net
Message-ID: <20080701093042.y199j0pwo0oosc4w at 192.168.2.5>
Content-Type: text/plain;       charset=ISO-8859-1;     DelSp="Yes";
       format="flowed"

Hi Zhang,

There is no problem.

This is the ewkb format used by postgis in order to storing geo data.

Use the astext() function if you want to see you data in human
readable format (wkt)

select astext(the_geom) from pt_gsqy_point;

it should be good! :)



Quoting zhengyong zhang <shieldly at gmail.com>:

> 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
>



===================
Jean David TECHER
06 60 46 85 05
04 99 77 17 87
===================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080702/a85a6041/attachment.html>


More information about the postgis-users mailing list