[postgis-devel] Re: shp2pgsql using problem

zhengyong zhang shieldly at gmail.com
Mon Jun 30 20:41:42 PDT 2008


Regina,
   thank you for you valuable information, it works.
   At the same time there is another way to get the exact point coordinates
as the following:
  select *,point(the_geom) from pt_gsqy_point;

On Tue, Jul 1, 2008 at 3:00 AM, <
postgis-devel-request at postgis.refractions.net> wrote:

> Send postgis-devel mailing list submissions to
>        postgis-devel at postgis.refractions.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://postgis.refractions.net/mailman/listinfo/postgis-devel
> or, via email, send a message with subject or body 'help' to
>        postgis-devel-request at postgis.refractions.net
>
> You can reach the person managing the list at
>        postgis-devel-owner at postgis.refractions.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of postgis-devel digest..."
>
>
> Today's Topics:
>
>   1. shp2pgsql using problem (zhengyong zhang)
>   2. RE: shp2pgsql using problem (Obe, Regina)
>   3. PostGIS bugtracker email notifications (Mark Cave-Ayland)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 30 Jun 2008 16:05:10 +0800
> From: "zhengyong zhang" <shieldly at gmail.com>
> Subject: [postgis-devel] shp2pgsql using problem
> To: postgis-devel at postgis.refractions.net
> Message-ID:
>        <d7f039270806300105p70e9fe82sb2cd591ef129a12 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> 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 > 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.
>
>
> --
> Zhengyong Zhang
> ECNU CS
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.refractions.net/pipermail/postgis-devel/attachments/20080630/cf8997ac/attachment-0001.html
>
> ------------------------------
>
> Message: 2
> Date: Mon, 30 Jun 2008 08:18:09 -0400
> From: "Obe, Regina" <robe.dnd at cityofboston.gov>
> Subject: RE: [postgis-devel] shp2pgsql using problem
> To: "PostGIS Development Discussion"
>        <postgis-devel at postgis.refractions.net>
> Message-ID:
>        <53F9CF533E1AA14EA1F8C5C08ABC08D2044CD15D at ZDND.DND.boston.cob>
> Content-Type: text/plain;       charset="us-ascii"
>
> Zhengyong,
>
> shp2pgsql dumps out in binary format to compensate for floating point
> issues with dumping out in WKT text.
>
> If you just want to see what the geometries look like as text from
> PostgreSQL - you can do
>
> SELECT ST_AsText(the_geom) from pt_gsqy_point limit 1;
>
> If you want to dump out your sql as WKT text instead of the default
> binary for some reason then you can use the -w switch
>
> shp2pgsql -w pt_gsqy_point.shp pt_gsqy_point > pt_gsqy_point.sql
>
> Hope that helps,
> Regina
>
>
> ________________________________
>
> From: postgis-devel-bounces at postgis.refractions.net
> [mailto:postgis-devel-bounces at postgis.refractions.net] On Behalf Of
> zhengyong zhang
> Sent: Monday, June 30, 2008 4:05 AM
> To: postgis-devel at postgis.refractions.net
> Subject: [postgis-devel] shp2pgsql using problem
>
>
> 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 > 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.
>
>
> --
> Zhengyong Zhang
> ECNU CS
> -----------------------------------------
> The substance of this message, including any attachments, may be
> confidential, legally privileged and/or exempt from disclosure
> pursuant to Massachusetts law. It is intended
> solely for the addressee. If you received this in error, please
> contact the sender and delete the material from any computer.
>
>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 30 Jun 2008 17:33:41 +0100
> From: Mark Cave-Ayland <mark.cave-ayland at siriusit.co.uk>
> Subject: [postgis-devel] PostGIS bugtracker email notifications
> To: PostGIS Development Discussion
>        <postgis-devel at postgis.refractions.net>
> Message-ID: <48690AE5.9030103 at siriusit.co.uk>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi everyone,
>
> Do you think it's worth setting up the PostGIS bugtracker so it emails
> postgis-devel whenever an issue is reported/changed? Otherwise it seems
> quite easy to miss a bug report/update as they come in...
>
>
> ATB,
>
> Mark.
>
> --
> Mark Cave-Ayland
> Sirius Corporation - The Open Source Experts
> http://www.siriusit.co.uk
> T: +44 870 608 0063
>
>
> ------------------------------
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
>
> End of postgis-devel Digest, Vol 57, Issue 29
> *********************************************
>



-- 
Zhengyong Zhang
ECNU CS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20080701/7205e22b/attachment.html>


More information about the postgis-devel mailing list