[Mapserver-users] problem with mapserver4 and postgres

collao_andres collao_andres at hotmail.com
Tue Sep 30 19:36:24 EDT 2003


hello I have compiled to mapserver 4, and I can use LABEL and SHAPE 
without problems, but when trying to read from the data base in 
Postgres 7.3.2/PostGIS 0,7,5 does not show respective layer.  I have 
tried of everything, but nothing seems to give result;  only stranger 
who happens is that when making this consultation in postgres appears 
the following message

parse error at or near "geom" at character

in the past, this aplication run without problem over mapserver 3.6.6 
and when start with version 4 I modified the Mapfile 

You have any idea??

MAP
  NAME "FIRSTMAP"
  STATUS ON
  #EXTENT -5696501 1923039 5696501 11022882
EXTENT 251537 6338840 258665 6344780  
  SIZE 400 400 
  SHAPEPATH "/usr/local/apache2/htdocs/alberto/"
  IMAGETYPE png
  IMAGECOLOR 255 255 255
  UNITS METERS
  WEB
    IMAGEPATH "/usr/local/apache2/htdocs/tmp/"
    IMAGEURL "/tmp/"
  END
  OUTPUTFORMAT
    NAME "png"
    MIMETYPE "image/png"
    DRIVER "GD/PNG"
    EXTENSION "png"
    IMAGEMODE PC256
    TRANSPARENT FALSE
  END

PROJECTION
    "proj=utm"
    "zone=19"
    "south"
    "ellps=intl"
    "towgs84=-288,175,-376,0,0,0,0"
    "units=m"
    "no_defs"
  END
LAYER
  NAME "SAMPLE GRID"
  PROJECTION
        "proj=utm"
    "zone=19"
    "south"
    "ellps=intl"
    "towgs84=-288,175,-376,0,0,0,0"
    "units=m"
    "no_defs"
  END
  TYPE LINE
  STATUS ON
  CLASS
     COLOR 255 255 128
     LABEL
     TYPE BITMAP
     SIZE MEDIUM
     COLOR 255 100 50
  END
END

 GRID
  MINSUBDIVIDE 64
  MAXSUBDIVIDE 64
  #ABELFORMAT "DDMM"
 END
END
LAYER
    NAME "ssd"
    STATUS ON
    DATA "comunas"
    TYPE POLYGON
    UNITS METERS
    SIZEUNITS PIXELS
    TOLERANCE 0
    TOLERANCEUNITS PIXELS
    CLASS
      TEMPLATE "void"
      STYLE
        SYMBOL 0
        COLOR 255 255 255
        OUTLINECOLOR 200 200 200
        SIZE 1
        MINSIZE 1
        MAXSIZE 100
      END
    END
  END
LAYER
    NAME "ejes_calles"
    STATUS ON
    DATA "the_geom from ejes_calles"
    TYPE LINE
    CONNECTIONTYPE POSTGIS
    CONNECTION "user=admin password=admin dbname=valparaiso 
host=localhost port=5432"
    UNITS METERS
    SIZEUNITS METERS
    TOLERANCE 0
    TOLERANCEUNITS PIXELS
    CLASS
      NAME "calles_zoom_5"
      STYLE
        #SYMBOL 0
        COLOR 0 0 0
        SIZE 10
      END
    END
  END
END





More information about the mapserver-users mailing list