[postgis-users] Mapserver PostGIS Layer returns nothing

Wesley Dyk aus at programmer.net
Wed Apr 28 14:30:10 PDT 2004


Summary: Trying to use a PostGIS layer of POINT geometries within the 
extent "-108.375280 40.032 -107.95597 40.24679" (from ogrinfo of the 
dumped shapefile), but get no results.

PostgreSQL 7.4.2
PostGIS 0.8.1
mapserver 4.0.2

I have been working with mapserver for a few weeks now and I have been 
able to create simple mapfiles with several layers.  They all seem to 
work great, except for PostGIS.    I have messed around with the LAYER 
definition and I know what changes will generate errors and which ones 
will just return whitespace (which are the only two results that I can 
get). 
I dumped my table to a shapefile.  Creating a layer based on that 
shapefile works just as the PostGIS layer is supposed to.  I tried 
reloading the shapefile into a new table, once with SRID=-1 and once 
with SRID=4269.  I can't get anything but whitespace from the database.  
I have tried to make the extent to encompass any possible point, with 
and without projection, but nothing.

What could I do to figure out what is going wrong?

This is the latest mapfile I have tried (with nothing but the PostGIS 
layer in question).

-----------------------postgis.map--------------------------------
SYMBOL
  NAME "triangle"
  TYPE vector
  POINTS
   0 4
   2 0
   4 4
   0 4
  END
END

SYMBOL
  NAME "circle"
  TYPE ellipse
  FILLED TRUE
  POINTS
   1 1
  END
END


MAP
  NAME TIMS
  IMAGETYPE PNG
  EXTENT -108.375280 40.032 -107.95597 40.24679
  #EXTENT -111.8 39.0032 -103.002 46.3
  SIZE 640 480
  SHAPEPATH "data"
  IMAGECOLOR 255 255 255
  FONTSET "fonts/fonts.list"

  WEB
    IMAGEPATH "/u01/mapserver/tims/tmp/"
    IMAGEURL "/tims/tmp/"
    LOG "/u01/mapserver/tims/tims1.log"
  END

  PROJECTION
    "init=EPSG:4269"
  END
  #PostGIS Well Header
  LAYER
    NAME wellheader
    STATUS DEFAULT
    DEBUG ON
    CONNECTIONTYPE postgis
    CONNECTION "user=aus dbname=TIMS host=denlx02"
    DATA "the_geom from wellheader"
    TYPE POINT
    PROJECTION
      "init=EPSG:4269"
    END
    #When the display works use different classes for certain conditions
    CLASS
      SYMBOL 'triangle'
      OUTLINECOLOR 0 255 0
      SIZE 5
    END
  END

END





More information about the postgis-users mailing list