[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] problems with mapinfo file export to postgis
From: "Paragon Corporation" <lr () pcorp ! us>
Date: 2009-09-26 4:30:28
Message-ID: C7D037A0EC3A4B40B3FAD2527C1CBD4E () b
[Download RAW message or body]
Karina,
Richard is right ogr2ogr defaults the geometry name to wkb_geometry unless
you override that behavior. shp2pgpsql happens to default to the_geom
unless you override that with -g option.
The names are just convention and you can name the geometry field anything
you want.
You can use the -lco GEOMETRY_NAME=the_geom in ogr2ogr to override its
default naming as I recall.
ogr2ogr if you prefer the PostGIS to shp2pgsql default name.
Hope that helps,
Regina
-----Original Message-----
From: postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of Richard
Greenwood
Sent: Friday, September 25, 2009 8:45 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] problems with mapinfo file export to postgis
On Fri, Sep 25, 2009 at 4:19 PM, Karina Guardado <kguardado@gmail.com>
wrote:
> Hi all,
>
> I have exported a Mapinfo file into postgres using the following
statement:
>
> ogr2ogr -f "PostgreSQL" -a_srs "EPSG:8913" PG:"host=localhost
> user=mysusername dbname=mydatabase password=mypass" mytabfile.TAB
>
> but when I want to access by mapserver layer I just don't know how to
> make que query for the geometry information because I found examples
> using select the_geom from mytable but this work fine with a shapefile
> but with mapinfo have no idea about the geometry part, so please if
> someone has an example or solution let me know
Unless you use the -nln (New Layer Name) option, ogr2ogr will name the
geometry column "wkb_geometry". So just use wkb_geometry instead of
the_geom. Hope that gets you started.
--
Richard Greenwood
richard.greenwood@gmail.com
www.greenwoodmap.com
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
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