[mapserver-users] Mapfile from Postgis, just Background No Map?

Fawcett, David (MPCA) David.Fawcett at state.mn.us
Wed Aug 4 06:59:54 PDT 2010


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/20100804/abf3e5b1/attachment.htm>


More information about the MapServer-users mailing list