Re: [mapserver-users] Spherical Mercator Projection Problem
Thanks! I wasn't aware of that. Additionally I had to increase layer class maxscale parameter. Sergey On Thu, Feb 24, 2011 at 10:33 PM, Jean-François Gigand jean-franc...@gigand.fr wrote: Hi, Indeed. Also note that EPSG:900913 is the same as EPSG:3785 and EPSG:3857. These three are the Spherical Mercator projection, which is the right one to use for overlays on Google Maps. Jean-François Gigand 2011/2/24 Fawcett, David (MPCA) david.fawc...@state.mn.us: Sergey, If your data is in epsg:4326 and you want to publish the data as epsg:3785, you will need to projection blocks to your layers. Something like: PROJECTION init=epsg:4326 END The Projection block in the MAP section defines your output projection. Because your data is not in the same projection, you will need to define a projection block in each layer section. Those projection blocks define the ‘input’ projection. They tell MapServer what projection the data exists in. This allows MapServer (with proj4 support) to re-project your data to the output projection. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Sergey Kraev Sent: Wednesday, February 23, 2011 5:01 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Spherical Mercator Projection Problem Hi, I’m running MS4W v3.0 (including MapServer 5.6.5) on Windows. My data source are PostGIS multipolygon countries’ borders. I have successfully got MapServer to render the world map in WGS84 projection using these settings: Request: http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=world.mapmode=mapmapsize=256+256mapext=-180+-90+180+90 world.map: MAP EXTENT -180 -90 180 90 #EXTENT -20037508 -20037508 20037508 20037508 SIZE 256 256 IMAGECOLOR 153 179 204 FONTSETc:\MS4W\fonts\fonts.list RESOLUTION96 MAXSIZE5000 PROJECTION init=epsg:4326 #init=epsg:3785 END … layers don’t have PROJECTION sections I would like MapServer to render the same data into a “Web (spherical) Mercator” projected map (epsg:3785), but I don't know how to modify my request and mapfile in order to get the correct map. With the following settings I just receive a picture without any polygons. \ms4w\proj\nad\epsg: … 3785 +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs … Request (only mapext is different): http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=world.mapmode=mapmapsize=256+256mapext=-20037508+-20037508+20037508+20037508 world.map (only EXTENT and PROJECTION are different): MAP #EXTENT-180 -90 180 90 EXTENT -20037508 -20037508 20037508 20037508 SIZE 256 256 IMAGECOLOR 153 179 204 FONTSETc:\MS4W\fonts\fonts.list RESOLUTION96 MAXSIZE5000 PROJECTION #init=epsg:4326 init=epsg:3785 END … layers don’t have PROJECTION sections I’m assuming that -20037508 -20037508 20037508 20037508 is correct extent for the whole world map, since Google uses that and they also have Mercator projection. Thanks for your help. Sergey ___ 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] Trouble with WFS GetFeature: get same feature returned multiple times
Hi, I just tried this with my test data and url similar you yours [1] and was not able to reproduce it locally using 5.4 and 5.6. If your data/map are not sensitive, would it be possible to send it to me directly and I will give it a try again (It would be easier for me to see the problem)? best regards [1]; http://127.0.0.1/cgi-bin/mapserv.exe?map=f:/projects/mapserver-buildkit-2008/mapserver/msautotest/wxs/wfs_filter_mine2.mapSERVICE=WFSVERSION=1.0.0REQUEST=GetFeatureTYPENAME=popplace_postgisfeatureid=popplace_postgis.Tignish,popplace_postgis.Cheticamp,popplace_postgis.Halifax On 24/02/2011 7:33 PM, Rainer Spittel wrote: Hi, I didn't had problems with UMN Mapserver for a very long time. I really love the product, and now I really need help. I set up a WFS Server, accessing a PostGIS point table. I use OpenLayers to visualise the WFS layer, and use the cluster strategy to group close points to a large cluster point. Now to the problem: I want to retrieve the feature data from a cluster point. I already have the IDs of the features of the cluster. Now I send a GetFeature request to the Mapserver to get all attribute information for the features, i.e. ID=231 and ID=273: http://[...]/cgi-bin/stations?request=getfeatureservice=WFSversion=1.0.0typename=DTISOUTPUTFORMAT=gml3featureid=DTIS.231,DTIS.273 http://[...]/cgi-bin/stations?request=getfeatureservice=WFSversion=1.0.0typename=DTISOUTPUTFORMAT=gml3featureid=DTIS.231,DTIS.273 The response of this request contains the feature 231 twice in the response. If I add another ID to the request, I get the feature 231 three times returned: [...] gml:featureMember ms:DTIS gml:id=DTIS.231 gml:boundedBy[...]/gml:boundedBy ms:msGeometry gml:Point srsName=EPSG:4326 gml:pos174.081500 -34.949500/gml:pos /gml:Point /ms:msGeometry ms:id231/ms:id /ms:DTIS /gml:featureMember gml:featureMember ms:DTIS gml:id=DTIS.231 [...] /gml:featureMember /ms:msFeatureCollection As soon as I export the table from PostgreSQL into a shapefile, update the mapfile to use the shapefile and run the same query, I get the correct response.I also tracked the SQL query, which is sent to Postgres, and the query is correct. PostgreSQL returns the correct rows. I use MapServer V5.4.1, which is not a very newer version,but I am constraint by the Debian packages. Is this an user error (I am not smart enough)? Or a bug? If so, has this bug been resolved in a later version? Any help is really appreciated. Thanks, Rainer Rainer Spittel | Head of Development SilverStripe http://silverstripe.com http://silverstripe.com/ Phone: +64 4 978 7330 Mobile: +64 21 1390370 Skype: fb3rasp ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Assefa Yewondwossen Software Analyst Email: yass...@dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Raster dataset recommendations
Hi all I have a largish raster dataset (2 GB) of hi resolution data points with a small geographical footprint. What would people recommend as the best way to prepare and then call data in the map file (with rendering performance in mind). It isn't going to be a basemap and the output legend will be based on the pixel value (e.g. wave height). Any thoughts would be much appreciated. Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: Raster dataset recommendations
Since it as less than 4gb, if you have the image in different tiles just merge them together. The image format should be tif. 1- Fisrt enable internal tiling with the command gdal_translate -co TILED=YES original.tif tiled.tif 2-than add overviews gdaladdo -r average 2 4 8 16 32 64 128 3-create a tileindex gdaltindex myindex.shp *.tif 4-than create a spatial index shptree myindex.shp and finally add the layer to the map LAYER NAME myorthos TYPE RASTER DUMP TRUE STATUS ON TILEINDEX ../data/myindex TILEITEM Location -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Raster-dataset-recommendations-tp6064491p6064777.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Re: Raster dataset recommendations
If you are merging tiles together to create 1 large tif, why would you need to create an index to it? I would think you would just directly reference the tif. so, rather than TILEINDEX ../data/myindex skip the index building steps just DATA ../data/big.tif On Fri, Feb 25, 2011 at 9:08 AM, Edi.Karadumi edikarad...@gmail.com wrote: Since it as less than 4gb, if you have the image in different tiles just merge them together. The image format should be tif. 1- Fisrt enable internal tiling with the command gdal_translate -co TILED=YES original.tif tiled.tif 2-than add overviews gdaladdo -r average 2 4 8 16 32 64 128 3-create a tileindex gdaltindex myindex.shp *.tif 4-than create a spatial index shptree myindex.shp and finally add the layer to the map LAYER NAME myorthos TYPE RASTER DUMP TRUE STATUS ON TILEINDEX ../data/myindex TILEITEM Location -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Raster-dataset-recommendations-tp6064491p6064777.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ 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] Re: Raster dataset recommendations
I would agree with Edi and recommend TIFF. It's easy to move around and deal with, and is the fastest of the raster formats. (unless something new has come up?) I would also agree with Mark: a tileindex is for mosaicing many TIFFs, and if your result is 1 single TIFF the tileindex is unnecessary. Edi's recommendation about a internal tile is VERY important. It costs slightly more disk space, but makes a tremendous improvement in the random access within the TIFF's extent. The overviews accomplish a similar performance gain, but for views in which the TIFF's extent is only a subset of what's showing on the map. -- HostGIS, Open Source solutions for the global GIS community Greg Allensworth - SysAdmin, Programmer, GIS Person, Security Network+ Server+ A+ Security+ Linux+ PHP PostgreSQL MySQL DHTML/JavaScript/AJAX No one cares if you can back up — only if you can recover. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Problems with showing attributes
Hi all, I´m having problems showing some attributes. The idea is that the user uses the info tool, click on the polygon and retrieve the information from the dataset. The data itself is shown, but the different names on the columns are not! I would really like that information to show as well. Below is an example on what I mean. http://osgeo-org.1803224.n2.nabble.com/file/n6064968/info.jpg I´ve used an old template that I´ve modified: trtd class='darknegativesmall' width='17%'Distrikt/tdtd class='lightsmall'[Distrikt]/td/tr trtd class='darknegativesmall' width='17%'Områdenavn/tdtd class='lightsmall'[Områdenavn]/td/tr trtd class='darknegativesmall' width='17%'Stednr/tdtd class='lightsmall'[Stednr]/td/tr tr valign='top'td class='darknegativesmall' width='17%'Beskrivelse/tdtd class='lightsmall'[Beskrivelse]/td/tr trtd class='darknegativesmall' width='17%'Græstype/tdtd class='lightsmall'[Græs_1]/td/tr trtd class='darknegativesmall' width='17%'Blomster/tdtd class='lightsmall'[Blomster_2]/td/tr trtd class='darknegativesmall' width='17%'Buske/tdtd class='lightsmall'[Buske_3]/td/tr trtd class='darknegativesmall' width='17%'Træer/tdtd class='lightsmall'[Træer_4]/td/tr trtd class='darknegativesmall' width='17%'Hække/tdtd class='lightsmall'[Hække_5]/td/tr trtd class='darknegativesmall' width='17%'Belægning/tdtd class='lightsmall'[Belægning_6]/td/tr trtd class='darknegativesmall' width='17%'Inventar/tdtd class='lightsmall'[Inventar_7]/td/tr trtd class='darknegativesmall' width='17%'Renholdelse/tdtd class='lightsmall'[Renholdelse_8]/td/tr trtd class='darknegativesmall' width='17%'Niveau_1/tdtd class='lightsmall'[Niveau_1]/td/tr trtd class='darknegativesmall' width='17%'Niveau_2/tdtd class='lightsmall'[Niveau_2]/td/tr trtd class='darknegativesmall' width='17%'Niveau_3/tdtd class='lightsmall'[Niveau_3]/td/tr trtd class='darknegativesmall' width='17%'Serviceydelser/tdtd class='lightsmall'[Serviceydelser_9]/td/tr trtd class='darknegativesmall' width='17%'Evt. bemærkning til serviceydelser/tdtd class='lightsmall'[serviceydelse_bemærkning]/td/tr trtd class='darknegativesmall' width='17%'Vandområder/tdtd class='lightsmall'[Vandområder_10]/td/tr trtd class='darknegativesmall' width='17%'Evt. bemærkninger/tdtd class='lightsmall'[Bemærkninger]/td/tr trtd class='darknegativesmall' width='17%'Opdateringsdato/tdtd class='lightsmall'[Opdateringsdato]/td/tr tr height=2tdtd/td/tr the data in the different colums (shown in the html as []) is okay, the problem is the name of the columns. What am I doing wrong? Sincerly, Christian -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Problems-with-showing-attributes-tp6064968p6064968.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] REST and SOAP in Mapserver
Is it possible to consume REST and/or SOAP services in Mapserver somewhat like WMS and how? ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re:REST and SOAP in Mapserver
Eric, Several years ago I did some experimental work with SOAP and REST inside the mapserv engine. The archives may contain a few old messages about the details, but what I was doing was to consume (now defunct) ESRI ArcWeb Services map images as raster backdrops for added mapserver vector layers. I created CONNECTIONTYPE ARCWEB and associated mapserver mapfile constructs to ArcWeb params. The communication part was fairly easy to deal with: I refit the existing OWS cURL code to access the ESRI server. The construction of the SOAP xml was cumbersome. The image that came back was slipped into the existing raster output mechanism. When I revisited the project a year or so later, I decided it was best to stay OUT of mapserv cgi and opt instead for doing the work in php-mapscript, where the SOAP processing is more advanced. Also, as I see it, the main problem of trying to consume SOAP and REST services in mapserver is simply that it is difficult to anticipate what kinds of functions you are going to be using to access the SOAP/REST server, so there's no generic way to associate mapfile constructs to the foreign parameters, and there's no way to make the construction of SOAP/REST requests generic either. If someone REALLY needed to do this within mapserv cgi, there might be some way to have WSDL-processing to make things more generic, but I'd be skeptical about the success of such a venture. Robert H. original message: From: Eric Weisbender weisb...@wapa.gov To: mapserver-users@lists.osgeo.org Is it possible to consume REST and/or SOAP services in Mapserver somewhat like WMS and how? ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Raster dataset recommendations
On 11-02-25 9:41 AM, Chris Jackson wrote: Hi all I have a largish raster dataset (2 GB) of hi resolution data points with a small geographical footprint. What would people recommend as the best way to prepare and then call data in the map file (with rendering performance in mind). It isn't going to be a basemap and the output legend will be based on the pixel value (e.g. wave height). Any thoughts would be much appreciated. Hi Chris, The guys have responded already with great recommendations (geotiff is indeed still the best way to rock with rasters); I'd like to add, regarding performance, that you'll see similar results with MapServer on both Unix and Windows, as shown by the results in the recent WMS Benchmarking exercise (http://www.slideshare.net/gatewaygeomatics.com/wms-performance-shootout-2010). -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] problem wfs
I set up a WFS Server, accessing a PostGIS poligon table. I use OpenLayers to visualise the WFS layer, but But not shown on the map I use MapServer V54.10.6 and Tomcat 6 Any help is really appreciated.Thanks,Flor Marina Rocha--- wfs = new OpenLayers.Layer.Vector(prueba, { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ version: 1.0.0, srsName: EPSG:4326, url: http://localhost:8081/cgi-bin/mapserv.exe?map=/ms4w/apps/geobis/htdocs/colombia/departamentos_colombiawfs.mapSERVICE=WFS;, featureType: departamentos_wfs, featureNS: http://mapserver.gis.umn.edu/mapserver;, geometryName: the_geom, extractAttributes: true }) }); map.addLayer(wfs); __ MAP NAME WFS_server EXTENT -81.735857 -4.223438 -66.851802 13.389054 SIZE 800 800 UNITS meters SHAPEPATH ../mapaInternet/0_Colombia/SH CONFIG MS_ERRORFILE /ms4w/tmp/ms_depto_error.txt WEB TEMPLATE 'geobis.html' IMAGEPATH /ms4w/tmp/ IMAGEURL /tmp/ METADATA wfs_title WMS Server Departamentos wfs_onlineresource http://localhost:8081/cgi-bin//mapserv.exe?map=/ms4w/apps/geobis/htdocs/colombia/departamentos_colombiawfs.mapSERVICE=WFS; wfs_srs epsg:4326 wfs_abstract my service wms END END PROJECTION init=epsg:4326 END OUTPUTFORMAT NAME png32 DRIVER GD/PNG MIMETYPE image/png IMAGEMODE RGBA EXTENSION png END LAYER NAME departamentos_wfs METADATA wfs_title departamentos_wfs gml_featureid gid wfs_featureid gid gml_include_items all wfs_include_items all wfs_maxfeatures 1000 wfs_namespace_uri http://mapserver.gis.umn.edu/mapserver; wfs_namespace_prefix ms END STATUS ON TYPE POLYGON CONNECTIONTYPE POSTGIS CONNECTION user=geobis password=geobis2010 host=192.168.1.39 port=5432 dbname=geobis DATA the_geom from cartografia.col_departamentos_pol using unique gid using srid=4326 PROCESSING CLOSE_CONNECTION=DEFER PROJECTION init=epsg:4326 END DUMP TRUE CLASS STYLE COLOR 128 128 128 OUTLINECOLOR 128 128 128 WIDTH 2 END NAME NAME END END END ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Raster dataset recommendations
Hi, Thanks for these advises! I take the opportunity of this topic to ask a similar question. I have a larger data set (400 Go) in about 24000 GeoTIFFs files, using the method described by Edi (tiled, internal overviews, index shape). It works pretty well (older version of MapServer), with on-the-fly reprojection, quick enough when the resolution is small-enough. My first question is about the right tile size. What should I take into account to seek the right balance between many small files and fewer bigger files? With too many files, I guess I should build external overviews as well. Also, do the 24000 files make a performance penalty for file access (stat() call)? Are TFW files checked even with geocoded tiffs? Second question: what about WKT raster, or the new raster support within PostGIS? I would love to use it, for the power of SQL queries. Is it really slower than GeoTIFF? Is it well suited for very large datasets? Any advise on this would be very helpful. Thanks! JF 2011/2/25 Jeff McKenna jmcke...@gatewaygeomatics.com: On 11-02-25 9:41 AM, Chris Jackson wrote: Hi all I have a largish raster dataset (2 GB) of hi resolution data points with a small geographical footprint. What would people recommend as the best way to prepare and then call data in the map file (with rendering performance in mind). It isn't going to be a basemap and the output legend will be based on the pixel value (e.g. wave height). Any thoughts would be much appreciated. Hi Chris, The guys have responded already with great recommendations (geotiff is indeed still the best way to rock with rasters); I'd like to add, regarding performance, that you'll see similar results with MapServer on both Unix and Windows, as shown by the results in the recent WMS Benchmarking exercise (http://www.slideshare.net/gatewaygeomatics.com/wms-performance-shootout-2010). -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ ___ 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] Re: Raster dataset recommendations
Jean, thats my problem too. I haven't resolved it yet the perfect way, but i have created mosaics of the data with lowered resolution, and a lower number of tiles . The number of tiles that are requested to see the map increases when you zoom out, so it needs to seek and read the tiles. Having them in different HD will make the displaying of the map faster because you will have more than one hd that does the seek/read process. The idea is that in your zoom levels you dont need more than four tiles to display the image. So youll have to calculate the mapserver resolution, image resolution and map control size. I have more than 3 terabytes of data in 15000 tiles and i created another mosaic with 1.5 terabytes and ~ 4000 tiles. And so on. My main problem is determining the scale when to switch from one mosaic to the other and i resolved it with testing the speed of the response. Maybe this time someone will have an idea to this post. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Raster-dataset-recommendations-tp6064491p6066256.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users