[UMN_MAPSERVER-USERS] Help: MapInfo -> PostGIS -> blank map, projection?
Skweda O'Bomsawin
sobomsawin at KASSINI.COM
Fri Jan 14 06:05:00 PST 2005
If you want to use the CGI, you can keep your STATUS ON in layer and add a
&layer=qldpoa_h in you URL after &mode=map... This way, you will be able to
control which layer to display, but take a look at CGI Mapserver
documentation for more details.
Have a nice day!
Skweda
-----Message d'origine-----
De : UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] De la
part de Daniel Caldeweyher
Envoyé : 13 janvier 2005 18:01
À : MAPSERVER-USERS at LISTS.UMN.EDU
Objet : [UMN_MAPSERVER-USERS] Help: MapInfo -> PostGIS -> blank map,
projection?
Hi,
I am using GIS on a research project for my studies and I have no
background in GIS.
I managed to bring lots of data from various sources into MapInfo, but now
I want to store all the spatial data centrally in PostreSQL / PostGIS.
I started with ogr2ogr to pipe the data directly from the TAB file to
PostGIS, which worked fine as I can use Quantum GIS to add the data as a
PostGIS layer.
However I can't get it to display anything (blank gif) with Mapserver. I am
using Apache2 + MapServer 4.4.1(pg) and it appears to be working as I can
display the "Hello World. Mapserver rocks." example.
When I export the table from MapInfo to MIF the exported file contains:
...
CoordSys Earth Projection 1, 33 Bounds (96, -45) (160, -8)
...
I also ran OGRINFO which gave me:
...
Layer name: QLDPOA_H
Geometry: Polygon
Feature Count: 405
Extent: (136.440601, -29.177898) - (153.552171, -9.142186)
Layer SRS WKT:
GEOGCS["unnamed",
DATUM["North_American_Datum_1983",
SPHEROID["GRS 80",6378137,298.257222101],
TOWGS84[0,0,0,0,0,0,0]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]]
...
I think the map is using long/lat + NAD83.
Other information:
In PostgreSQL the "spatial_ref_sys" table is empty.
The "geometry_columns" table contains:
19745;"''";"public";"qldpoa_h";"the_geom";"2";"-1";"MULTIPOLYGON"
The "the_geom" column in my "qldpoa_h" table has SRID=-1 for all rows
"http://localhost/cgi-bin/mapserver/mapserv.exe?map=qldpoa.map&mode=map"
My qldpoa.map file looks like this:
MAP
SIZE 400 400
NAME ABS
STATUS ON
#EXTENT 136.440601 -29.177898 153.552171 -9.142186 #from ogrinfo
EXTENT 98 -45 160 -8 #from MIF
UNITS dd #kilometers?
IMAGECOLOR 255 255 255
IMAGETYPE gif
LAYER
NAME "qldpoa_h"
TYPE POLYGON
STATUS ON
PROJECTION
"proj=longlat"
"ellps=GRS80"
"datum=NAD83"
"no_defs"
END
DATA "the_geom from qldpoa_h"
CONNECTION "user=gis password=gis dbname=ABS host=localhost port=5432"
CONNECTIONTYPE postgis
CLASS
COLOR 255 0 0
OUTLINECOLOR 0 255 0
END
END
OUTPUTFORMAT
NAME gif
DRIVER "GD/GIF"
MIMETYPE "image/gif"
IMAGEMODE PC256
EXTENSION "gif"
END
END
Could please someone have a look at this and tell me what I am doing wrong,
because I have tried everything I know, but I always only get a blank image.
Thank you very much in advance.
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.11 - Release Date: 2005-01-12
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.11 - Release Date: 2005-01-12
More information about the MapServer-users
mailing list