[mapserver-users] Mapfile from Postgis, just Background No Map?
Fawcett, David (MPCA)
David.Fawcett at state.mn.us
Thu Aug 5 05:57:38 PDT 2010
Without knowing what spatial reference system (SRS) your data is in, it is hard to tell you specifically if anything is wrong. How does the map created MapServer look? Does it display your data correctly, does it line up with your other data? If so, success.
If your data is in a SRS that uses geographic coordinates (lat/long), the maximum valid x value would be 180 and the maximum y value would be 90. I haven’t tested whether MapServer will forgive values outside of that range or continue around the globe, but they are incorrect.
If your data is in a SRS that uses kilometers (as you set your second UNITS block), you are mapping an area ~400k x ~300k.
What does your GIS tell you about the data’s SRS?
David.
From: elisabeth theresia [mailto:dbee_kawai at yahoo.com]
Sent: Thursday, August 05, 2010 7:43 AM
To: Fawcett, David (MPCA)
Subject: Re: [mapserver-users] Mapfile from Postgis, just Background No Map?
i already found the problem STATUS to DEFAULT.
then why my mapfile's EXTENT look weird? i looked at Propertise->Source of the shapefile in Arcgis, it mention about the Extent, then i write it in Mapfile. is it wrong?
Thanks Mr. David
________________________________
From: "Fawcett, David (MPCA)" <David.Fawcett at state.mn.us>
To: elisabeth theresia <dbee_kawai at yahoo.com>; "mapserver-users at lists.osgeo.org" <mapserver-users at lists.osgeo.org>
Sent: Wed, August 4, 2010 8:59:54 PM
Subject: RE: [mapserver-users] Mapfile from Postgis, just Background No Map?
I see a few potential issues with your mapfile:
1. For testing, set your layer STATUS to DEFAULT or add ‘&layer=tb_kasusdbd’ to your URL
2. You have two entries for UNITS (DD and KILOMETERS). You should only have one of these lines, and the units should match the units of your output projection. So, if your data really is in geographic coordinates (lat/long), your units should be ‘DD’.
3. The values in your EXTENT line look weird. The values in your EXTENT need to be expressed in the units used by your output projection/spatial reference system. If your data is in geographic coordinates, these values are invalid. If your data is in some other spatial reference system, you will need to change your UNITS to match that SRS.
David.
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of elisabeth theresia
Sent: Tuesday, August 03, 2010 10:55 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Mapfile from Postgis, just Background No Map?
Good day all,
i want to ask, i have file shp that already convert to Postgis, then i want to appear it in mapfile named:map_postgis.map then check in: http://localhost/cgi-bin/mapserv.exe?map=i:/Spatial/mapfile/map_postgis.map&mode=map, but that i found just background no Map. why?
shp: kec_kasus_DBD
db in postgis: db_SpatialSura
table: tb_kasusdbd
mapfile: map_postgis
for checking: i want to see column 'kecamatan'
here my mapfile:
MAP
NAME kec_kasus_DBD
IMAGETYPE JPEG
EXTENT -123.950500 -183.224900 299.457000 145.260600
STATUS ON
UNITS DD
SIZE 546 388
IMAGECOLOR 255 241 215
SHAPEPATH "i:\Spatial\shp_kec"
FONTSET "i:\Spatial\font\font.dat"
UNITS KILOMETERS
#DATA
LAYER
NAME "tb_kasusdbd"
STATUS ON
TYPE POLYGON
CONNECTIONTYPE POSTGIS
CONNECTION "user=dbee dbname=dbSpatialSura host=localhost port=5432 password=xxxxxx"
DATA "the_geom FROM tb_kasusdbd USING UNIQUE code_kec"
MINSCALE 100000
#FILTER "type= 'jumdbd_08'"
CLASS
NAME "kecamatan"
STYLE
COLOR 255 22 22
OUTLINECOLOR 67 70 31
WIDTH 2
ANTIALIAS TRUE
END#style
END#class
END#layer
END#map
Thanks :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100805/a46deb22/attachment.htm>
More information about the MapServer-users
mailing list