Can ´t see the p ostgis layer

Brock Anderson banders at REFRACTIONS.NET
Tue Feb 7 14:25:27 PST 2006


Luis,

It looks like one of your layers is stored as lat/long, and the other is 
UTM.  You should include a PROJECTION block within each of your layers 
to define what projection the data is stored in. Mapserver needs to know 
what projection your data is stored in so that it can reproject 
appropriately to the desired output projection.

I believe if Mapserver doesn't find a PROJECTION block within a layer, 
it assumes the layer is stored in whatever PROJECTION you use in your 
MAP block. 

Brock

Luis Treviño wrote:

>Hi mapserver-users:
>
>I´m using mapserver CGI with no mapscript, I have a shapefile and a
>postgis layer. I can see the shapefile layer with no problems but I can´t
>see the postgis layer. If I call the postgis layer with a lat/long extent
>I can see the points but can´t see the shapefile layer, If I call both
>layers with UTM extent I just see the shape layer. I´m stuck.
>
>Don´t know what I´m doing wrong.
>This is my map file:
>
>MAP
>  NAME "pg"
>  STATUS ON
>  EXTENT 477959 2.13346e+006 490080 2.14072e+006
>  SIZE 800 600
>  SYMBOLSET 'symbols.sym'
>  FONTSET 'fonts.txt'
>  IMAGETYPE GIF
>  IMAGECOLOR 255 255 255
>  UNITS METERS
>
>  WEB
>    IMAGEPATH '/var/www/tmp/'
>    IMAGEURL '/tmp/'
>    LOG 'ms.log'
>    TEMPLATE Tubica.html
>  END
>
>  PROJECTION
>    #"proj=latlong"
>    "proj=longlat"
>    "ellps=WGS84"
>    "datum=WGS84"
>    "no_defs"
>  END
>
>    LAYER
>      NAME gis
>      STATUS ON
>      TYPE POINT
>      DEBUG ON
>      CONNECTION "user=xxx password=xxx dbname=bsiubica
>host=xxx.xxx.xxx.xx port=5432"
>      CONNECTIONTYPE postgis
>      DATA "posicion from loca as foo using unique cmpoid using srid=4326"
>
>      UNITS METERS
>      SIZEUNITS METERS
>
>      CLASS
>        COLOR 255 0 0  #rojo
> SYMBOL 7
> SIZE 10
>      END
>    END
>
>    LAYER
>      NAME mypnt
>      STATUS ON
>      TYPE POINT
>      CLASS
>      END
>    END
>
>    LAYER
>      NAME calles
>      STATUS ON
>      DATA /var/gisdata/urbtest/coy_GrLin.shp
>      TYPE LINE
>      UNITS METERS
>
>      CLASS
>       STYLE
>         SYMBOL 7
>   SIZE 1
>   COLOR 0 43 255
>       END
>      END
>     END
>END
>
>any help will be apressited.
>Thanks
>Luis.
>  
>



More information about the MapServer-users mailing list