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: [email protected] [mailto:[email protected]] 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 <[email protected]> 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 [email protected] www.greenwoodmap.com _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
