[mapserver-users] How to change the feature points of a circle
Hi, Can anybody please help me with a mapscript code to change the feature points of a circle defined in the mapfile. My mapfile looks as below, LAYER NAME Circle STATUS off TRANSPARENCY 50 TYPE circle FEATURE POINTS 73.802230 18.484904 73.902774 18.584458 END #end of POINTS END #end of FEATURE CLASS STYLE OUTLINECOLOR 255 0 0 COLOR 186 227 255 END #end of STYLE END #end of CLASS END #end of LAYER Circle Currently I am using C# mapscript. A code in php will also be great. Thanks, Sucharita ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] postgis wms bounding box
Hello List, I am setting up a wms server which retrieves its data from a postgis database and I am having trouble displaying the layer in QGIS or OpenJump correctly. QGIS doesn't show anything at all, while openjump requires zooming in to see the data. A getmap request (without bbox-parameter) in the browser does give me a correct view of the data. I am using on Ubuntu 7.10 MapServer version 4.10.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG Having a look at the getcapabilites document, there seems to be a problem with the calculation of the layer extents: here's the global extent from the getcapabilities response: LatLonBoundingBox minx=5.73166 miny=49.446 maxx=6.53226 maxy=50.1818 / BoundingBox SRS=EPSG:2169 minx=48928 miny=57005 maxx=106114 maxy=138765 / And here's the bbox from the actual postgis layer: LatLonBoundingBox minx=-179.798 miny=-2.19659e+13 maxx=177.392 maxy=2.63905e+18 / BoundingBox SRS=EPSG:2169 minx=-2.5e+07 miny=-2.5e+07 maxx=2.5e+07 maxy=2.5e+07 / As you can see, the bounding box of the layer is completely wrong. It should nearly be the same as the global extent. The data definition in the mapfile is: Data centroid from public.locations using unique id Any suggestions? Should I return a bbox in the data query for the postgis layer to prevent the wrong bbox of the layer? And if yes, how do I do this? Greetings from Luxembourg Frank ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] postgis wms bounding box
Hi Frank, that is a known problem with postgis layers. If i recall it correctly it is basically due to the fact that it is timely expensive to calculate the extent of a postgis layer (it'd need to be done for each getCap request). You can come around this by specifying the wms_extent metadata parameter for that layer manually. Cheers, Michael 2008/4/22 Frank Broniewski [EMAIL PROTECTED]: Hello List, I am setting up a wms server which retrieves its data from a postgis database and I am having trouble displaying the layer in QGIS or OpenJump correctly. QGIS doesn't show anything at all, while openjump requires zooming in to see the data. A getmap request (without bbox-parameter) in the browser does give me a correct view of the data. I am using on Ubuntu 7.10 MapServer version 4.10.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG Having a look at the getcapabilites document, there seems to be a problem with the calculation of the layer extents: here's the global extent from the getcapabilities response: LatLonBoundingBox minx=5.73166 miny=49.446 maxx=6.53226 maxy=50.1818 / BoundingBox SRS=EPSG:2169 minx=48928 miny=57005 maxx=106114 maxy=138765 / And here's the bbox from the actual postgis layer: LatLonBoundingBox minx=-179.798 miny=-2.19659e+13 maxx=177.392 maxy=2.63905e+18 / BoundingBox SRS=EPSG:2169 minx=-2.5e+07 miny=-2.5e+07 maxx=2.5e+07 maxy=2.5e+07 / As you can see, the bounding box of the layer is completely wrong. It should nearly be the same as the global extent. The data definition in the mapfile is: Data centroid from public.locations using unique id Any suggestions? Should I return a bbox in the data query for the postgis layer to prevent the wrong bbox of the layer? And if yes, how do I do this? Greetings from Luxembourg Frank ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- --- Michael Schulz [EMAIL PROTECTED] in medias res Gesellschaft für Informationstechnologie mbH In den Weihermatten 66 79108 Freiburg Tel +49 (0)761 556959-5 Fax +49 (0)761 556959-6 http://www.webgis.de / http://www.zopecms.de --- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] To fire Parameterized query using GeoMoose Tool in Mapserver
Hi, all of u i am facing one problem from last week., that i am unable to fire the parameterized query as i dont know the format of such type of query. i am using GeoMoose tool. can any 1 help m. i am new to Mapserver world, reply m. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] postgis wms bounding box
Thanks Michael, that solved the issue. This issue is so close to RTFM that I am really ashamed to post again ;-), but I really did not find it in the wms how-to. Well thanks again for the tipp. Just one more question though. Is it possible to determine the extent of the postgis layer somehow dynamically, maybe within a query? I just think of a dynamically growing table where the extent might change anytime and I would have to adjust the extent in the mapfile each time the extent gets bigger. Greetings Frank On Tuesday 22 April 2008 12:29:46 Michael Schulz wrote: Hi Frank, that is a known problem with postgis layers. If i recall it correctly it is basically due to the fact that it is timely expensive to calculate the extent of a postgis layer (it'd need to be done for each getCap request). You can come around this by specifying the wms_extent metadata parameter for that layer manually. Cheers, Michael 2008/4/22 Frank Broniewski [EMAIL PROTECTED]: Hello List, I am setting up a wms server which retrieves its data from a postgis database and I am having trouble displaying the layer in QGIS or OpenJump correctly. QGIS doesn't show anything at all, while openjump requires zooming in to see the data. A getmap request (without bbox-parameter) in the browser does give me a correct view of the data. I am using on Ubuntu 7.10 MapServer version 4.10.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG Having a look at the getcapabilites document, there seems to be a problem with the calculation of the layer extents: here's the global extent from the getcapabilities response: LatLonBoundingBox minx=5.73166 miny=49.446 maxx=6.53226 maxy=50.1818 / BoundingBox SRS=EPSG:2169 minx=48928 miny=57005 maxx=106114 maxy=138765 / And here's the bbox from the actual postgis layer: LatLonBoundingBox minx=-179.798 miny=-2.19659e+13 maxx=177.392 maxy=2.63905e+18 / BoundingBox SRS=EPSG:2169 minx=-2.5e+07 miny=-2.5e+07 maxx=2.5e+07 maxy=2.5e+07 / As you can see, the bounding box of the layer is completely wrong. It should nearly be the same as the global extent. The data definition in the mapfile is: Data centroid from public.locations using unique id Any suggestions? Should I return a bbox in the data query for the postgis layer to prevent the wrong bbox of the layer? And if yes, how do I do this? Greetings from Luxembourg Frank ___ 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
Re: [mapserver-users] One layer filled with 3 colors
Emilio Ponce wrote: Hi everyone, I'm trying to paint one layer with 3 different colors, depending on one field called 'zona' that is a column of the table stored at a postGIS database. I'm doing this in the layer: ... STATUS DEFAULT CONNECTIONTYPE postgis CONNECTION host= dbname= user= password= port=' DATA the_geom from car_marccata FILTER zona='FORA' CLASS COLOR 143 81 8 END FILTER zona='MAR' CLASS COLOR 0 154 239 END FILTER zona='CATA' CLASS COLOR 223 223 223 END It doesn't works.. I've tried different strategies but I haven't found the problem yet. Does anyone knows what's wrong? Thanks! Try this: STATUS DEFAULT CONNECTIONTYPE postgis CONNECTION host= dbname= user= assword= port=' DATA the_geom from car_marccata CLASSITEM zona CLASS EXPRESSION ([zona] = 'FORA') COLOR 143 81 8 END CLASS EXPRESSION ([zona] = 'MAR') COLOR 0 154 239 END CLASS EXPRESSION ([zona] = 'CATA') COLOR 223 223 223 END ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] One layer filled with 3 colors
This code takes me now to a new one question: Is there a way to assign colours dynamically? I'm wondering if mapserver is able to detect the different options of the column 'zona', and then use random palette colours to represent these automatically, without having to set COLOR for each one manually. It can be useful because every column has different options. Thank you guys, 2008/4/22 Emilio Ponce [EMAIL PROTECTED]: Thanks Stephen! I've found the solution with your idea, is very similar to your code: LAYER ... DATA the_geom from car_marccata CLASSITEM zona CLASS EXPRESSION FORA COLOR 143 81 8 END CLASS EXPRESSION MAR COLOR 0 154 239 END CLASS EXPRESSION CATA COLOR 223 223 223 END END Regards, 2008/4/22 Stephen Woodbridge [EMAIL PROTECTED]: Emilio Ponce wrote: Hi everyone, I'm trying to paint one layer with 3 different colors, depending on one field called 'zona' that is a column of the table stored at a postGIS database. I'm doing this in the layer: ... STATUS DEFAULT CONNECTIONTYPE postgis CONNECTION host= dbname= user= password= port=' DATA the_geom from car_marccata FILTER zona='FORA' CLASS COLOR 143 81 8 END FILTER zona='MAR' CLASS COLOR 0 154 239 END FILTER zona='CATA' CLASS COLOR 223 223 223 END It doesn't works.. I've tried different strategies but I haven't found the problem yet. Does anyone knows what's wrong? Thanks! Try this: STATUS DEFAULT CONNECTIONTYPE postgis CONNECTION host= dbname= user= assword= port=' DATA the_geom from car_marccata CLASSITEM zona CLASS EXPRESSION ([zona] = 'FORA') COLOR 143 81 8 END CLASS EXPRESSION ([zona] = 'MAR') COLOR 0 154 239 END CLASS EXPRESSION ([zona] = 'CATA') COLOR 223 223 223 END -- Emilio -- Emilio ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] how to get a sub-map of a map(shapefile)?
HI, I am wondering if anybody knows a tool to get a sub-map of a map. For example, I need to get a small map around some location instead of a whole big map(Using whole big map will be time consuming). Thanks a lot. -wh. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] anbody knows if there is a toolbox able to calculate k-shortest paths?
HI, I am wondering if there is a toolbox able to calculate k-shortest paths? Basically Dijkstra gives us the shortest path, but sometimes, we need several shortest paths(the shortest one, the second shortest one, etc..). Thanks a lot. -Weihua ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] php/mapscipt getExtent
hello all. i have a PostGIS layer (without its extents specified) in a mapfile. i am trying to use getExtent on this layer, but the coordinates i get back ([minx:-2500,miny:-2500,maxx:2500,maxy:2500]) are not the correct extents([1180204.375000, 809428.75,1222443.00, 857276.187500)]). is there a way to get the proper extents of a layer even though they might not be specified in the mapfile? ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] how to get a sub-map of a map(shapefile)?
You mean a reference map? MapServer has a the ability to generate those. The small map in the corner of this interface is an example: http://www.dnr.state.mn.us/maps/landview.html Steve On 4/22/2008 at 1:25 PM, in message [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: HI, I am wondering if anybody knows a tool to get a sub-map of a map. For example, I need to get a small map around some location instead of a whole big map(Using whole big map will be time consuming). Thanks a lot. -wh. ___ 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] AGG Anti-alias VECTOR sybmol
Greetings! I've generated a map: http://maps.mapking.com/eg.png with these: OUTPUTFORMAT NAMEAGGA DRIVERAGG/PNG IMAGEMODERGBA TRANSPARENTON EXTENSIONpng FORMATOPTION INTERLACE=OFF END CLASS MAXSCALEDENOM500 MINSCALEDENOM50 STYLE WIDTH4 COLOR50 50 50 END STYLE SYMBOLrail_line SIZE 3 COLOR250 250 250 END END SYMBOL NAME rail_line TYPE ELLIPSE POINTS 1 1 END STYLE 8 4 8 END #GAP 100 FILLED TRUE #ANTIALIASTRUE END As you can see in the image, the everything are smooth except the railway. All line and polygon layers are drawn with simple styles without the use of SYMBOL. Only the railway lines are drawn with a VECTOR symbol. Does AGG's anti-alias works with symbols? If not, any work around? ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] query data raster
Hello friends, I am working with MApServer 5, want to do query on layers raster and have the following problem: on a layers raster once chosen the tool of query gives the following thing to the clickear: MsQueryByPoint (): Search returned not results. Not matching record (s) found. The layer raster of my map file defini like that: LAYER NAME arboles TYPE raster DATA cobertura/GLC_5Final.tif STATUS ON CLASS EXPRESSION ([pixel] = 1) STYLE COLOR 0 255 0 END TEMPLATE template/raster.html END CLASS EXPRESSION ([pixel] = 1) STYLE COLOR 255 226 187 END #TEMPLATE template/raster.html END HEADER template/raster_header.html FOOTER template/raster_footer.html The file raster.html (that is the principal one in the consultation) defini like that: html body Pixel:br values=[value_list]br value_0=[value_0]br value_1=[value_1]br value_2=[value_2]br RGB = [RED],[GREEN],[BLUE]p Class = [class]br /body /html I wait for his help .. from already thank you very much to this forum that really contributes things very interesting and good solutions Regards Pablo.- -- Pablo Zader ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] AGG Anti-alias VECTOR sybmol
try SYMBOL NAME rail_line TYPE SIMPLE PATTERN 8 4 8 END END along with STYLE SYMBOLrail_line WIDTH 3 COLOR250 250 250 END regards, thomas On Wed, Apr 23, 2008 at 5:02 AM, Jackey Cheung [EMAIL PROTECTED] wrote: Greetings! I've generated a map: http://maps.mapking.com/eg.png with these: OUTPUTFORMAT NAMEAGGA DRIVERAGG/PNG IMAGEMODERGBA TRANSPARENTON EXTENSIONpng FORMATOPTION INTERLACE=OFF END CLASS MAXSCALEDENOM500 MINSCALEDENOM50 STYLE WIDTH4 COLOR50 50 50 END STYLE SYMBOLrail_line SIZE 3 COLOR250 250 250 END END SYMBOL NAME rail_line TYPE ELLIPSE POINTS 1 1 END STYLE 8 4 8 END #GAP 100 FILLED TRUE #ANTIALIASTRUE END As you can see in the image, the everything are smooth except the railway. All line and polygon layers are drawn with simple styles without the use of SYMBOL. Only the railway lines are drawn with a VECTOR symbol. Does AGG's anti-alias works with symbols? If not, any work around? ___ 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
Re: [mapserver-users] AGG Anti-alias VECTOR sybmol
by the way, seeing your output I don't think that you're using agg. have you correctly set IMAGETYPE AGGA in your mapfile (or use format=AGGA in your url if using mapserv) thomas On Wed, Apr 23, 2008 at 5:02 AM, Jackey Cheung [EMAIL PROTECTED] wrote: Greetings! I've generated a map: http://maps.mapking.com/eg.png with these: OUTPUTFORMAT NAMEAGGA DRIVERAGG/PNG IMAGEMODERGBA TRANSPARENTON EXTENSIONpng FORMATOPTION INTERLACE=OFF END CLASS MAXSCALEDENOM500 MINSCALEDENOM50 STYLE WIDTH4 COLOR50 50 50 END STYLE SYMBOLrail_line SIZE 3 COLOR250 250 250 END END SYMBOL NAME rail_line TYPE ELLIPSE POINTS 1 1 END STYLE 8 4 8 END #GAP 100 FILLED TRUE #ANTIALIASTRUE END As you can see in the image, the everything are smooth except the railway. All line and polygon layers are drawn with simple styles without the use of SYMBOL. Only the railway lines are drawn with a VECTOR symbol. Does AGG's anti-alias works with symbols? If not, any work around? ___ 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