[mapserver-users] Meaning of PROJECTION and WMS - using OpenLayers
Hi, since a couple of days we try visualize data from a postgis database using mapserver and openlayers. As far as we know is our postgis data in EPSG:25832 and our mapfile for mapserver looks like this: http://dpaste.com/hold/591626/ Now we have created an index.html containing the following JS snippet: http://dpaste.com/hold/591627/ We can test the WMS using a direct WMS URL to our MapServer and asking for EPSG:25832 and the correct extends, and it displays the map just fine (Everything is protected so I cannot provide this URL here). If we try to display the map using the openlayers code above we do not see anything at all. You can zoom and move it around but that's everthing you get with openlayers. Networkdebugging tools tell me, that OpenLayers by default is requesting that google projection of EPSG:3867. But even providing coordinates that should somehow be in Dortmund it does only display the backgroundcolor. Maybe you can help me clearing up a few things. Like the list of projections in 'wms_srs' is what MapServer provides via WMS. And the PROJECTION entry on the 'LAYER' level should be set to the projection of my data. Correct? And the PROJECTION on the MAP level is ignored? Does MapServer automatically convert the coordinates? MapServer requires to have EXTEND set. Which projection should I use? The one defined at MAP level? Best regards, Michael ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Coloring vectordata by features/infos
Hello, I am rendering vectordata from a PostGIS database which works like a charm. My layer definition looks like this: LAYER NAME "vector" METADATA "wms_include_items" "all" "wms_title" "dortmund_basic" END TEMPLATE gfi.html TYPE POLYGON ## Should be inherited from MAP level, but is good practice to have here, too: ##(or not? <.<) #PROJECTION # "init=epsg:900913" #END DUMP true CONNECTIONTYPE postgis CONNECTION "host=x dbname=x user=x password=x port=5432" DATA "the_geom FROM x" CLASS STYLE COLOR 200 50 50 OUTLINECOLOR 60 60 60 #SYMBOL 0 ANTIALIAS true OPACITY 80 # in percent END END END Right now, I have not fully grasped how features/information is saved along with the vector data in the PostGIS database, but I am also not maintaining it. Supposingly we will have a float-value saved along with every vector. Can someone explain or give me hints, how I could map such a value which is saved along into a color? Like a brighter shade of red the higher the value is? Sincerely Michael Gajda ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Coloring vectordata by features/infos
Hmm, any hints for what I should search for? Am 04.09.2011 19:35, schrieb Michael G.: > Hello, > > I am rendering vectordata from a PostGIS database which works like a charm. > My layer definition looks like this: > LAYER > NAME "vector" > METADATA > "wms_include_items" "all" > "wms_title" "dortmund_basic" > END > TEMPLATE gfi.html > TYPE POLYGON > ## Should be inherited from MAP level, but is good practice to have > here, too: ##(or not? <.<) > #PROJECTION > # "init=epsg:900913" > #END > DUMP true > > CONNECTIONTYPE postgis > CONNECTION "host=x dbname=x user=x password=x port=5432" > DATA "the_geom FROM x" > > CLASS > STYLE > COLOR 200 50 50 > OUTLINECOLOR 60 60 60 > #SYMBOL 0 > ANTIALIAS true > OPACITY 80 # in percent > END > END > END > > Right now, I have not fully grasped how features/information is saved along > with the vector data in the PostGIS database, but I am also not maintaining > it. Supposingly we will have a float-value saved along with every vector. > Can someone explain or give me hints, how I could map such a value which is > saved along into a color? Like a brighter shade of red the higher the value > is? > > Sincerely > Michael Gajda > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Styling (classes) based on zoom/extent?
Hello everyone, I would like to render a layer only on closer zoomlevels. I am using OpenLayers that requests the map via WMS. I assume a zoom-level is not passed via WMS, so I would have to use the extends of a tile, which is fine, too. Can I somehow use these values in the EXPRESSION statement of classes? Best wishes, Michael ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users