[mapserver-users] .netCDF and MapServer
Hi all Happy New Year! I wondered if anyone had used MapServer at all to extract and display data from .netCDFs (SWAN model format). Thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] SQL Server 2008 layer
Hi all Sorry for this v.basic question. Trying to load a layer from SQL 2008 R2 64bit using the msplugin_mssql2008.dll and when running shp2image it just bombs out on that layer saying neither DSN nor Server keyword supplied. Two things I can see could be the issue - accessing the plugin itself (any way to test if that is actually loaded okay?) or that the connection string is duff. The SQL instance is the default instance on the same box as the web application, I have seen various flavours of connections out there,with different starts to the string and ways to define instance. Below is what I went with PLUGIN msplugin_mssql2008.dll CONNECTION MSSQL:Server=SERVER1;uid=user1;pwd=qwerty1234;database=name1;Integrated Security=True I have the dll in the data folder for the mapfile (it does live in the mapfile folder and system32 just in case - hardwiring the path using c:\...\...\msplugin_mssql2008.dll didn't work either) I am unsure about the beginning of the connection string and the server reference (I am using the server name (as it is a default instance - works in my web apps)). Any clues much appreciated Thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] mapserver-users Digest, Vol 56, Issue 1
Fixed it in the end. PLUGIN C:\..\...\msplugin_mssql2008.dll CONNECTION server=x;uid=;pwd=xx;database=x;Integrated Security=false What is odd is I can only get a geometry type to work, my driver is dated Jan-10, maybe pre-geography datatype support - all I can think of. DATA SitePoint1 from Site USING UNIQUE SiteID USING SRID=4326 #DATA SitePoint (geography) from Site USING UNIQUE SiteID USING SRID=4326 - throws an error about not finding geometry type Chris On 3 September 2012 20:00, mapserver-users-requ...@lists.osgeo.org wrote: Send mapserver-users mailing list submissions to mapserver-users@lists.osgeo.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.osgeo.org/mailman/listinfo/mapserver-users or, via email, send a message with subject or body 'help' to mapserver-users-requ...@lists.osgeo.org You can reach the person managing the list at mapserver-users-ow...@lists.osgeo.org When replying, please edit your Subject line so it is more specific than Re: Contents of mapserver-users digest... Today's Topics: 1. SQL Server 2008 layer (Chris Jackson) -- Message: 1 Date: Mon, 3 Sep 2012 15:51:33 +0100 From: Chris Jackson webturt...@gmail.com To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] SQL Server 2008 layer Message-ID: CACU1gf7PSCZ25axKSJwwPCcD-Y= fnb1dht2x-_g_eseiygc...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 Hi all Sorry for this v.basic question. Trying to load a layer from SQL 2008 R2 64bit using the msplugin_mssql2008.dll and when running shp2image it just bombs out on that layer saying neither DSN nor Server keyword supplied. Two things I can see could be the issue - accessing the plugin itself (any way to test if that is actually loaded okay?) or that the connection string is duff. The SQL instance is the default instance on the same box as the web application, I have seen various flavours of connections out there,with different starts to the string and ways to define instance. Below is what I went with PLUGIN msplugin_mssql2008.dll CONNECTION MSSQL:Server=SERVER1;uid=user1;pwd=qwerty1234;database=name1;Integrated Security=True I have the dll in the data folder for the mapfile (it does live in the mapfile folder and system32 just in case - hardwiring the path using c:\...\...\msplugin_mssql2008.dll didn't work either) I am unsure about the beginning of the connection string and the server reference (I am using the server name (as it is a default instance - works in my web apps)). Any clues much appreciated Thanks Chris -- next part -- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120903/84d3118f/attachment-0001.html -- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users End of mapserver-users Digest, Vol 56, Issue 1 ** ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] mapserver-users Digest, Vol 56, Issue 1
Apologies all, one last question... To retrieve attributes from MS SQL I thought something like the following would work: DATA SitePoint1 from (select SiteID,SitePoint1,SiteName from Site) USING UNIQUE SiteID USING SRID=4326 However, the layer fails to draw. Am I in need of a newer MSSQL2008 driver or is it a poorly formed query? Thanks Chris On 3 September 2012 20:27, Chris Jackson webturt...@gmail.com wrote: Fixed it in the end. PLUGIN C:\..\...\msplugin_mssql2008.dll CONNECTION server=x;uid=;pwd=xx;database=x;Integrated Security=false What is odd is I can only get a geometry type to work, my driver is dated Jan-10, maybe pre-geography datatype support - all I can think of. DATA SitePoint1 from Site USING UNIQUE SiteID USING SRID=4326 #DATA SitePoint (geography) from Site USING UNIQUE SiteID USING SRID=4326 - throws an error about not finding geometry type Chris On 3 September 2012 20:00, mapserver-users-requ...@lists.osgeo.orgwrote: Send mapserver-users mailing list submissions to mapserver-users@lists.osgeo.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.osgeo.org/mailman/listinfo/mapserver-users or, via email, send a message with subject or body 'help' to mapserver-users-requ...@lists.osgeo.org You can reach the person managing the list at mapserver-users-ow...@lists.osgeo.org When replying, please edit your Subject line so it is more specific than Re: Contents of mapserver-users digest... Today's Topics: 1. SQL Server 2008 layer (Chris Jackson) -- Message: 1 Date: Mon, 3 Sep 2012 15:51:33 +0100 From: Chris Jackson webturt...@gmail.com To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] SQL Server 2008 layer Message-ID: CACU1gf7PSCZ25axKSJwwPCcD-Y= fnb1dht2x-_g_eseiygc...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 Hi all Sorry for this v.basic question. Trying to load a layer from SQL 2008 R2 64bit using the msplugin_mssql2008.dll and when running shp2image it just bombs out on that layer saying neither DSN nor Server keyword supplied. Two things I can see could be the issue - accessing the plugin itself (any way to test if that is actually loaded okay?) or that the connection string is duff. The SQL instance is the default instance on the same box as the web application, I have seen various flavours of connections out there,with different starts to the string and ways to define instance. Below is what I went with PLUGIN msplugin_mssql2008.dll CONNECTION MSSQL:Server=SERVER1;uid=user1;pwd=qwerty1234;database=name1;Integrated Security=True I have the dll in the data folder for the mapfile (it does live in the mapfile folder and system32 just in case - hardwiring the path using c:\...\...\msplugin_mssql2008.dll didn't work either) I am unsure about the beginning of the connection string and the server reference (I am using the server name (as it is a default instance - works in my web apps)). Any clues much appreciated Thanks Chris -- next part -- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120903/84d3118f/attachment-0001.html -- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users End of mapserver-users Digest, Vol 56, Issue 1 ** ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] OGR Virtual Format and character encoding
All One thought I did have, if the characters where html encoded in the SQL table (e.g. ü as #252;) is there anyway to get MapServer to render them correctly again in a label? I guess OGR can only deal with UTF-8 encoded characters (I am using nvarchar fields, but in an ISO collation in SQL 2005 - not v.UTF-8 friendly I think!) Thanks Chris On 30 August 2012 15:46, Chris Jackson webturt...@gmail.com wrote: Hi all I have OGR Virtual Format layer in my map file and the underlying .OVF is calling a flat MS SQL table of point data. The layer displays fine, but I am having issues with umlauts etc for one of the attribute fields. When I run the ogrinfo command on the layer, it has already messed up the encoding. In SQL it looks and queries fine. Any pointers on how you can maintain the encoding? Many thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] OGR Virtual Format and character encoding
Frank I am using SrcDataSourceODBC:. in the OVF file. I am parsing the file using OGRinfo via commandline and the characters are looking odd straight away. Hadn't thought about using the spatial add-on for 2005, can that be called directly from the mapfile instead? I usually just use shapefiles (performance surprising good), but have need of a SQL table of point data (all over Europe - hence the character issues) updated via a web-form to be called via MapServer and another application. Any pointers appreciated! Cheers Chris On 31 August 2012 21:16, Frank Warmerdam warmer...@pobox.com wrote: Chris, I'm a bit unclear if the problem is happening in the MS SQL driver, or in the VRT driver. If you use OGR directly against the MS SQL data are things messed up? Are you using ODBC or the actual MSSQLSpatial driver? Best regards, Frank On Fri, Aug 31, 2012 at 1:07 PM, Chris Jackson webturt...@gmail.com wrote: All One thought I did have, if the characters where html encoded in the SQL table (e.g. ü as #252;) is there anyway to get MapServer to render them correctly again in a label? I guess OGR can only deal with UTF-8 encoded characters (I am using nvarchar fields, but in an ISO collation in SQL 2005 - not v.UTF-8 friendly I think!) Thanks Chris On 30 August 2012 15:46, Chris Jackson webturt...@gmail.com wrote: Hi all I have OGR Virtual Format layer in my map file and the underlying .OVF is calling a flat MS SQL table of point data. The layer displays fine, but I am having issues with umlauts etc for one of the attribute fields. When I run the ogrinfo command on the layer, it has already messed up the encoding. In SQL it looks and queries fine. Any pointers on how you can maintain the encoding? Many thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Software Developer ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] OGR Virtual Format and character encoding
Hi all I have OGR Virtual Format layer in my map file and the underlying .OVF is calling a flat MS SQL table of point data. The layer displays fine, but I am having issues with umlauts etc for one of the attribute fields. When I run the ogrinfo command on the layer, it has already messed up the encoding. In SQL it looks and queries fine. Any pointers on how you can maintain the encoding? Many thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] OGRVRT Data Sources and SQL server
Hi Robert and Jeff I tried those steps (think FID is optional) and no further - more blank outputs using shp2img (ms bebugging at 5 - no errors at all, happily finds layer and draws it - apparently! - should rename my layer to snowflakes or white cats). Have run shp2img debugging - nothing obvious, but couldn't print out output (can send screenshot if anyone interested). Not sure how to retrieve the sql query sent (Jeff?). I have grabbed the output from ogrinfo (see below - no extents...does that mean something) - seems to be working ok to the untrained eye! Mapfile below too (NB. have tried with and without projections at map and layer level), I am baffled, will start to use a later version of ms4w and check on another server too. Cheers Chris ogrinfo output: INFO: Open of `d:/xxx/xxx/omreg2.ovf' using driver `VRT' successful. Layer name: omreg1 Geometry: Point Feature Count: 5 Layer SRS WKT: GEOGCS[WGS 84, DATUM[WGS_1984, SPHEROID[WGS 84,6378137,298.257223563, AUTHORITY[EPSG,7030]], AUTHORITY[EPSG,6326]], PRIMEM[Greenwich,0, AUTHORITY[EPSG,8901]], UNIT[degree,0.01745329251994328, AUTHORITY[EPSG,9122]], AUTHORITY[EPSG,4326]] SiteKeyID: Integer (10.0) SiteID: Integer (10.0) SiteType: String (255.0) SiteName: String (255.0) SiteLat: Real (0.0) SiteLong: Real (0.0) OGRFeature(omreg1):1 SiteKeyID (Integer) = 2269 SiteID (Integer) = 1 SiteType (String) = Regulated tidal exchange SiteName (String) = Abbotts Hall (Stage 1) SiteLat (Real) = 0.84556009184722 SiteLong (Real) = 51.7846475991705 POINT (51.784647599170498 0.84556009184722) My mapfile now is this: MAP UNITS meters EXTENT -15 30 40 70 SIZE 600 500 SHAPEPATH d:\xxx\xxx\ SYMBOLSET ../common/symbols/symbols-pmapper.sym FONTSET ../common/fonts/msfontset.txt RESOLUTION 96 IMAGETYPE png INTERLACE OFF CONFIG PROJ_LIB D:\xxx\proj\nad\ CONFIG GDAL_DATA D:\xxx\gdaldata\ CONFIG MS_ERRORFILE D:\x\tmp\ms_error.txt DEBUG 5 PROJECTION #init=epsg:4326 +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs no_defs END # # Image formates for GD # OUTPUTFORMAT NAME png DRIVER GD/PNG MIMETYPE image/png IMAGEMODE RGB FORMATOPTION INTERLACE=OFF TRANSPARENT OFF EXTENSION png END OUTPUTFORMAT NAME png8 DRIVER GD/PNG MIMETYPE image/png IMAGEMODE PC256 FORMATOPTION INTERLACE=OFF TRANSPARENT OFF EXTENSION png END OUTPUTFORMAT NAME jpeg DRIVER GD/JPEG MIMETYPE image/jpeg IMAGEMODE RGB FORMATOPTION QUALITY=70 EXTENSION jpg END OUTPUTFORMAT NAME GTiff DRIVER GDAL/GTiff MIMETYPE image/tiff IMAGEMODE RGB FORMATOPTION TFW=YES #FORMATOPTION COMPRESS=PACKBITS EXTENSION tif END OUTPUTFORMAT NAME imagemap MIMETYPE text/html FORMATOPTION SKIPENDTAG=OFF DRIVER imagemap END LAYER NAME test TYPE POINT CONNECTIONTYPE OGR CONNECTION omreg2.ovf # have also tried ./omreg2.ovf - both files in same folder - no luck with either DATA omreg1 PROJECTION #init=epsg:4326 +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs no_defs END STATUS ON CLASS SYMBOL 1 SIZE 6 COLOR 255 0 0 LABEL SIZE MEDIUM TYPE BITMAP COLOR 0 0 0 END END END END #Map On 29 May 2012 21:54, Robert Sanson robert.san...@asurequality.com wrote: Hi Chris You need to define the primary key in your .ovf file: FIDfarmgate_id/FID I put the .ovf file in the same directory as my .map file, then Mapserver can find it: CONNECTION ./farmgates.ovf All thebest, Robert ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] OGRVRT Data Sources and SQL server
Hi all Has anyone got much experience of using OGRVRT Data Sources in Windows with SQL server system DSNs? I am having an issue with system DSN connection type (windows authentication will work fine and proceses the table fine, sql authentication - get not trusted connection (both authentication types enabled in instance)) when testing via ogrinfo commandline. Then if I take the working code forward then I can't render the layer in a map output via say shp2img commandline or final map application. Map code below: LAYER NAME virtual TYPE POINT CONNECTIONTYPE OGR CONNECTION OGRVRTDataSource OGRVRTLayer name='omreg1' SrcDataSourceODBC:@omreg1/SrcDataSource SrcSQLSELECT * FROM dbo.Site/SrcSQL GeometryField encoding='PointFromColumns' x='SiteLong' y='SiteLat'/ GeometryTypewkbPoint/GeometryType /OGRVRTLayer /OGRVRTDataSource # the name and path to the virtual.ovf file, relative to shapepath may work? DATA omreg1 TEMPLATE void PROJECTION init=epsg:4326 END METADATA wms_srs 4326 wms_title virtual END SIZEUNITS PIXELS STATUS ON TOLERANCE 0 TOLERANCEUNITS PIXELS UNITS METERS CLASS NAME Virtual COLOR 255 0 0 OUTLINECOLOR 255 0 0 SYMBOL 'kreuz4' SIZE 6 END # Class END My version of mapserver is a little old (5.6.1). I wonder whether I need to set any extra SQL related env variables. Any assistance much appreciated! Thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] character encoding
Hi all I am having some issues with special characters in my application (sure I am not the first!) and wondered what the best way is to 'clean up' the data so I know it is specifically in a given format say UTF-8 or ISO. My source data was from KML - shp using ArcGIS 10 (though who knows what the kml format was!). One would assume if using ArcMap on a UK machine would give you an ISO output Should I copy the characters back into the attribute table via ArcGIS (but what program should I use to copy the characters from - Word...). I did use the ArcGIS export registry setting to export my supposed ISO shapfile to UTF-8 format (but the label rendering is wrong). Any ideas would be much appreciated! Many thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re character encoding
Hi Jeff I may well try that! The trouble is I have a stack of attributes in a Access db which I was joining onto the KML data. I need the complete dataset for an ArcGIS Server data service anyway so a shapefile seemed to be a good way to join it all and assist with that (will end up in SDE) and my mapfile dataset too. I had already read the page you mentioned and all is in place (I am using the MS4W PHP/mapscript set-up on IIS) and my original ISO flavoured version labels up nicely - it just breaks some of the query functionality (though it shouldn't - which is why I wonder if some of the characters are badly formed)! Thanks for the advice Chris Hi Chris, My quick thoughts are: - use ogr2ogr (the GDAL/OGR library) to do your conversion from KML to shp (if you are on Windows, the MS4W product can help you with that http://www.maptools.org/ms4w/index.phtml?page=downloads.html) - another option is to use the KML in its native format with MapServer (http://www.mapserver.org/input/vector/kml.html), which is also possible with MS4W - if by application problems you mean map label problems with encoded characters, this howto should help you: http://www.mapserver.org/mapfile/labelencoding.html Hope that helps. -jeff ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Mapscript and wms client
Hi I am trying to use a remote WMS service in my mapfile and am not having any luck. I resorted to the MapServer tutorial example and still had no luck: LAYER # MODIS WMS map from JPL NAME modis_jpl TYPE RASTER OFFSITE 0 0 0 STATUS On CONNECTIONTYPE WMS CONNECTION http://wms.jpl.nasa.gov/wms.cgi?; METADATA wms_srs EPSG:4326 wms_name modis wms_server_version 1.1.1 wms_format image/jpeg END PROJECTION init=epsg:4326 END END # Modis WMS image ends here Mapscript has wms client enabled so am I missing another setting required in the mapfile? Thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapscript and wms client
Hi Brent and Armin The GetCapapabilies bit threw me! Well the one I am trying to load is GEBCO which I think is up. Having said that I have just changed the wms_name and reloaded the map and it works (maybe it just needed some sleep)..! Out of interest how do you specify a given layer from the WMS in the mapfile code and is the wms_name just a friendly name you use or specific to the WMS too? Separately Google maps layers, mapfiles and GDAL, from what I read loading tiles this way this breaks Google's TC because it bypasses their APIs, anyone have a view? My GEBCO code is: LAYER # GEBCO WMS map NAME 'gebco' TYPE RASTER OFFSITE 0 0 0 STATUS On CONNECTIONTYPE WMS CONNECTION http://www.gebco.net/data_and_products/gebco_web_services/web_map_service/mapserv ? METADATA wms_srs EPSG:4326 wms_name gebco_08_grid wms_server_version 1.1.1 wms_format image/jpeg END PROJECTION init=epsg:4326 END END Cheers Chris On 5 September 2011 23:06, Brent Fraser bfra...@geoanalytic.com wrote: Chris, I don't think NASA's JPL is serving data anymore (although it does return a GetCapapabilies XML). Best Regards, Brent Fraser On 9/5/2011 3:53 PM, Chris Jackson wrote: Hi I am trying to use a remote WMS service in my mapfile and am not having any luck. I resorted to the MapServer tutorial example and still had no luck: LAYER # MODIS WMS map from JPL NAME modis_jpl TYPE RASTER OFFSITE 0 0 0 STATUS On CONNECTIONTYPE WMS CONNECTION http://wms.jpl.nasa.gov/wms.cgi?; METADATA wms_srs EPSG:4326 wms_name modis wms_server_version 1.1.1 wms_format image/jpeg END PROJECTION init=epsg:4326 END END # Modis WMS image ends here Mapscript has wms client enabled so am I missing another setting required in the mapfile? Thanks Chris ___ mapserver-users mailing listmapserver-users@lists.osgeo.orghttp://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] IIS and mapfiles and also GDAL
Hi Brent Thanks for the quick answers, the new rewriting rules (with reverse proxy) have worked well with Tomcat on port 8080 - no more isapi dlls! What you listed for Mapnik is essentially like mine, what I am not sure is what other GDAL configuration is needed on the box - just an environment variable or some other setting in the mapfile...? Thanks Chris On 2 September 2011 16:04, Brent Fraser bfra...@geoanalytic.com wrote: Chris, I've used the Iconic Rewriter with older versions of IIS (the native rewriting capability in IIS7 looks interesting). You may be able to use an environment variable to set the default map file, but this may not be very useful if you have multiple map files. There are a few other options for hiding the mapfile (proxy script, redirect, form post instead of get, etc), put I think the rewrite method is the most effective (the client never gets the map file path), with almost no performance hit. The way I access Mapnik tiles in mapserver is to create a layer in the map file: LAYER DATA frmt_wms_openstreetmap_MAPNIK.xml NAME Mapnik PROJECTION 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 no_defs END STATUS ON TYPE RASTER PROCESSING OVERSAMPLE_RATIO=1 PROCESSING LOAD_FULL_RES_IMAGE=NO UNITS METERS END # LAYER and frmt_wms_openstreetmap_MAPNIK.xml XML file of GDAL_WMS Service name=TMS ServerUrlhttp://tile.openstreetmap.org/$ {z}/${x}/${y}.png/ServerUrl /Service DataWindow UpperLeftX-20037508.34/UpperLeftX UpperLeftY20037508.34/UpperLeftY LowerRightX20037508.34/LowerRightX LowerRightY-20037508.34/LowerRightY TileLevel19/TileLevel TileCountX1/TileCountX TileCountY1/TileCountY YOrigintop/YOrigin /DataWindow ProjectionEPSG:900913/Projection BlockSizeX256/BlockSizeX BlockSizeY256/BlockSizeY BandsCount3/BandsCount Cache / /GDAL_WMS Best Regards, Brent Fraser On 9/2/2011 8:13 AM, Chris Jackson wrote: Hi I just wanted to check if the only way to parse a mapfile in an IIS environment to use an absolute path to the mapfiles e.g. http://myserver/cgi-bin/mapserv.exe?map=C:\Inetpub\wwwroot\workshop\itasca.map. I wonder if anyone has had success with rewrite rules (IIS7)? Also how is GDAL triggered when calling the mapfile (in IIS). The scenario is I am trying to use an xml in the mapfile layer which then calls http://tile.openstreetmap.org/ The XML is GDAL_WMS Service name=TMS ServerUrlhttp://tile.openstreetmap.org/${z}/${x}/${y}.png/ServerUrl /Service DataWindow UpperLeftX-20037508.34/UpperLeftX UpperLeftY20037508.34/UpperLeftY LowerRightX20037508.34/LowerRightX LowerRightY-20037508.34/LowerRightY TileLevel19/TileLevel TileCountX1/TileCountX TileCountY1/TileCountY YOrigintop/YOrigin /DataWindow ProjectionEPSG:900913/Projection BlockSizeX256/BlockSizeX BlockSizeY256/BlockSizeY BandsCount3/BandsCount Cache/ /GDAL_WMS Am I remotely doing this the right way? I am used to calling local data from the mapfile and tiled services is a bit of a new beast, so I thought I would give it a go! Many thanks in advance Chris ___ mapserver-users mailing listmapserver-users@lists.osgeo.orghttp://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] 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] MapScript dlls?
Hi Does anyone know where I might find a compiled version of the MapScript dll for NTS PHP 5.3.1 (or 5.3.3) on Windows (VC9)? I am trying to use FastCGI combined with Wincache (hence NTS required). Many thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Display performance
Hi Jukka Thanks for the response and the great investigative work! My log entry for drawing the layer is - [Fri Sep 03 10:01:25 2010].658000 msDrawMap(): Layer 1 (meanspringpeakflow), 24.500s. :o( I do wonder if my Mapfile layer definition is just v.poor (admittedly no expert!) so have taken an excerpt of the layer defintion (there are about 15 classes in all) - views anyone, should I be loading it a different way? Also Jukka, could I get a sample of your scale dependent WMS GROUP layer map code - as it sounds like a great idea maybe for this but also some v.hi-res model grids I am thinking about. Thanks again, much appreciated! Chris LAYER NAME meanspringpeakflow TYPE polygon DEBUG 5 DATA Tide TEMPLATE void PROJECTION +proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs END METADATA DESCRIPTION Mean Spring Peak Flow RESULT_FIELDS ID,DISTANCE,DEPTH,MEAN_SP_PC RESULT_HEADERS ID,Minimum Distance (m),Average Depth (m),Mean Spring Peak Flow (m/s) ows_title meanspringpeakflow RESULT_HYPERLINK ID|| Load graphing tool END # Metadata CLASS NAME ' 4.00 (m/s) ' EXPRESSION ([MEAN_SP_PC] = 4 AND [MEAN_SP_PC] 4.5) STYLE COLOR 135 99 64 END #end style END # end class CLASS NAME '3.51 - 4.00' EXPRESSION ([MEAN_SP_PC] = 3.5 AND [MEAN_SP_PC] 4) STYLE COLOR 158 126 63 END #end style END # end class etc etc On 3 September 2010 09:04, Rahkonen Jukka jukka.rahko...@mmmtike.fi wrote: Hi, I took some numbers to compare with. Material and methods Polygon layer, rather simple polygons with few vertises, Feature Count: 117383 DEBUG 5 in mapfile WMS client asks for the whole layer Mapserver 5.2.1 (CGI) on not so fast Windows computer Results First request: rendering time taken from the log file are between 3.5 and 4.5 seconds Following request, BBOX is changing but all the polygons are drawn though: rendering times 1.5 - 2.5 seconds Conclusions and discussion At first one might think that my server is faster. But this test is not controlled at all because we are not using the same shapefiles and we can't say so. What we can say that a couple of hundred of thousand polygons can be drawn faster. However, it does not really make sense to render an image this way if it should be fast. If the screen has 1000 by 1000 pixels it makes a million pixels together. For 20 polygons it makes 5 pixels per polygon. You can simplify your polygon geometries pretty much before anybody can see the differense. If the polygons are spread evenly nobody can even see the difference if there are 2 or 20 polygons on the screen. We have one polygon layer with about million polygons and for that I made two simplified layers which contain only 1 percent and 10 percent of all the polygons. Those and the original shapefile are put into the same scale dependent WMS GROUP layer. This group is pretty fast at any scale. The 1 percent layer is perhaps a bit too sparse but I have been too lazy to have a try with 2 or 5 percent samples. -Jukka Rahkonen- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Display performance
Jukka Thank you for the code I will give it a go. I guess I will dust off the field calculator in ArcMap and see if that improves things somewhat, I guess that is a similar overhead when classifying a raster by pixel value (not sure how to fix that). So if I understand you right then I would just use a number per class (1-15 say) in the new attribute field and then code something like: CLASSITEM MEAN_SP_PC CLASS EXPRESSION 1 NAME 4.00 (m/s) STYLE COLOR 135 99 64 END END Thanks again for the insight. Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Display performance
Ok Folks I am now ready to go home and have a sit down!! I have re-classified the layer with a new class column and then ordered the shapefile by the most common classes. the results are in.. 3.5 secs for the entire layer to draw!! (only a saving of 21secs +) - the main saving was by just reclassifying. Thanks to all as this has been a great learning experience, I am now going to see if I can find a bigger model grid to play with.! ;o) Chris On 3 September 2010 11:07, thomas bonfort thomas.bonf...@gmail.com wrote: That would be the fastest yes. Even more so if you order the classes inside your layer by order of occurences, i.e. the most common classes first, and the least common ones last. -- thomas On Fri, Sep 3, 2010 at 11:54, Chris Jackson webturt...@gmail.com wrote: Jukka Thank you for the code I will give it a go. I guess I will dust off the field calculator in ArcMap and see if that improves things somewhat, I guess that is a similar overhead when classifying a raster by pixel value (not sure how to fix that). So if I understand you right then I would just use a number per class (1-15 say) in the new attribute field and then code something like: CLASSITEM MEAN_SP_PC CLASS EXPRESSION 1 NAME 4.00 (m/s) STYLE COLOR 135 99 64 END END Thanks again for the insight. Chris ___ 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] Display performance
Hi I wondered if anyone knew if displaying a 50,000 polygon dataset would be significantly faster if called from a database rather than a spatially indexed shapefile, or is it a similar overhead for both. Thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Display performance
Steve That saves some work, but how long would you expect one that size to load? I have just realised (admittedly not looked at the data for a couple of years) that it is actually 170,000 records - takes about 20 secs to load - sound reasonable? Chris On 2 September 2010 20:50, Lime, Steve D (DNR) steve.l...@state.mn.uswrote: That’s not that big a dataset. Probably faster from a local shapefile. Steve *From:* mapserver-users-boun...@lists.osgeo.org [mailto: mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Chris Jackson *Sent:* Thursday, September 02, 2010 2:29 PM *To:* mapserver-users@lists.osgeo.org *Subject:* [mapserver-users] Display performance Hi I wondered if anyone knew if displaying a 50,000 polygon dataset would be significantly faster if called from a database rather than a spatially indexed shapefile, or is it a similar overhead for both. Thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Display performance
Hi 20 secs is from turning the layer on in the interface. The data is a model grid as polygons, the file size is about 40mb. I agree 20secs is too long - I am a web developer in general and know users are fickle! The other layers load v.quickly so happy in general with performance of smaller model grids. The same layer in an old arcgis server app loads a few secs quicker (from SDE rather than file) and we just accepted it was just 'one of those things' and deadlines got in the way - mmm... The app is living on a reasonable specced server living in a data centre and the old web app has been serving the offshore renewables industry fine for a couple of years or so, just have a need to move to an open source solution. I was trying to get a feel whether moving to PostGIS rather than local file will speed things up - I get the feeling it is marginal. Maybe I am missing another processing trick (admittedly I have done minimal work bar a spatial index). Thanks for the swift response. Chris On 2 September 2010 21:07, P Kishor punk.k...@gmail.com wrote: On Thu, Sep 2, 2010 at 3:03 PM, Chris Jackson webturt...@gmail.com wrote: Steve That saves some work, but how long would you expect one that size to load? I have just realised (admittedly not looked at the data for a couple of years) that it is actually 170,000 records - takes about 20 secs to load - sound reasonable? What does to load mean? Is 20 seconds the time elapsed from when the user clicks on the browser to when the user sees the resulting image? You are ripping through 170K features and creating an image. 20 seconds seems like a lot. How big and complicated are those features? How big is the shapefile, in physical size (MB, KB). What kind of computer are you using? What other processes are running? So many variables... in any case, if you have a web app, and you want your users to remain interested in it, you probably will want to bring down the time to load to sub-second, or, at the most a few seconds. You will also want to consider multiple users -- acceptable performance with one user might translate into horrendous performance with several concurrent users. Chris On 2 September 2010 20:50, Lime, Steve D (DNR) steve.l...@state.mn.us wrote: That’s not that big a dataset. Probably faster from a local shapefile. Steve From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Chris Jackson Sent: Thursday, September 02, 2010 2:29 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Display performance Hi I wondered if anyone knew if displaying a 50,000 polygon dataset would be significantly faster if called from a database rather than a spatially indexed shapefile, or is it a similar overhead for both. Thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu --- Assertions are politics; backing up assertions with evidence is science === ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Display performance
Steve I don't have postgis, hence the fishing around for answers from helpful people like yourself! You are right about playing around with generalisations, unfortunately the colouring is very specific and needs to match other GIS outputs, so will have to still 'look' right - something I will have a play with in due course. Once you zoom in the data is quite usable - ie. the spatial index is doing it's job, so not all is lost. Thanks for the ideas Chris On 2 September 2010 21:36, Lime, Steve D (DNR) steve.l...@state.mn.uswrote: If you have postgis already sitting around then it’s pretty quick just to try it and see. I’m assuming you’re talking 20sec for everything, all 170K features? A spatial index doesn’t buy you anything in the ‘all’ case. That is a lot of features to display at once and I wonder if one can even make sense of that much detail. A common technique would be display reduced or somehow generalized versions of the data at that level and then hit the detailed data as a user zooms in. Without knowing the data how you’d do that would vary. For example, you could actually rasterize the data and display the pre-rendered raster version small scales. Or you might be able to thin the data a bit. Lots of options. Steve ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Feature select performance
Steve I was pursuing the performance issue on the pmapper mailing list too. It transpires it is related to browser performance (from a JS aspect) for the web apps query/redraw processes - IE7 - awful (8mins), IE8 and FF pretty good - around 20secs for returning/highlighting 5000 features (and building results table) and Chrome about 13 secs, that is without even creating a spatial index. Thanks for the info and I think I may even not have to go down the db route (which keeps life simple!) just advise IE6/7 users to switch browsers (not the first webGIS app I know that does this!) Thanks Chris. On 25 August 2010 18:08, Lime, Steve D (DNR) steve.l...@state.mn.us wrote: Like with everything it depends… Selection of features via a bounding box shouldn’t be much, or really any, slower than drawing since it’s basically the same mechanism for both. Attribute queries can be quite slow with shapefiles since MapServer doesn’t do any attribute indexing. That’s where the RDMS really adds value. There shouldn’t be much of a difference with a bbox query, and in fact, a local shapefile will probably be faster, even on larger datasets as long as you’ve build an spatial index file. Anyway, it’s what you do with results afterwards that matters and that’s probably specific to your application. I’ve used query files to persist selected features over many map draws successfully on modest (50,000 feature) sized shapefiles. Steve *From:* Chris Jackson [mailto:webturt...@gmail.com] *Sent:* Tuesday, August 24, 2010 10:34 AM *To:* Lime, Steve D (DNR) *Cc:* mapserver-users@lists.osgeo.org *Subject:* Re: [mapserver-users] Feature select performance Steve The selection of layer data is done by a bounding box, though querying by parameter values is just as slow. The mapfile is directly calling up the shapefile (I had just followed the P.Mapper examples of displaying/querying shapefiles directly). So probably the answers to those questions lie under the hood of P.Mapper, which I assume is using the PHP mapscript.dll to do the work. Is the direct query to shapefile approach v.efficient for larger datasets..?. Ignoring the app I am using what is a good approach to large feature datasets from a MapServer perspective? Thanks Chris On 24 August 2010 14:27, Lime, Steve D (DNR) steve.l...@state.mn.us wrote: How is the selection done? How is the highlighting done? Those processes will really impact performance depending on how things are implemented. Steve From: mapserver-users-boun...@lists.osgeo.org [ mapserver-users-boun...@lists.osgeo.org] On Behalf Of Chris Jackson [ webturt...@gmail.com] Sent: Tuesday, August 24, 2010 3:19 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Feature select performance Hi all I have rigged up a webGIS app (P.Mapper framework) where one of the underlying datasets is a model grid (many thousand cells) in a shapefile. The data displays nice and quick when just viewing, but if I allow the user to select say 5000 cells it is very (extremely) slow to redraw with the highlighted cells. Doing the same task in a very old ArcGIS server web app was much quicker (admittedly the data was in SDE/MS SQL). So my question is what is the best way to improve performance - would just transferring the shapefile to to say a MS SQL 2005 db with the MSSQLSPATIAL add-on be a good step or is there are better way to present the data in the Map file? Many thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Feature select performance
Hi all I have rigged up a webGIS app (P.Mapper framework) where one of the underlying datasets is a model grid (many thousand cells) in a shapefile. The data displays nice and quick when just viewing, but if I allow the user to select say 5000 cells it is very (extremely) slow to redraw with the highlighted cells. Doing the same task in a very old ArcGIS server web app was much quicker (admittedly the data was in SDE/MS SQL). So my question is what is the best way to improve performance - would just transferring the shapefile to to say a MS SQL 2005 db with the MSSQLSPATIAL add-on be a good step or is there are better way to present the data in the Map file? Many thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Feature select performance
Steve The selection of layer data is done by a bounding box, though querying by parameter values is just as slow. The mapfile is directly calling up the shapefile (I had just followed the P.Mapper examples of displaying/querying shapefiles directly). So probably the answers to those questions lie under the hood of P.Mapper, which I assume is using the PHP mapscript.dll to do the work. Is the direct query to shapefile approach v.efficient for larger datasets..?. Ignoring the app I am using what is a good approach to large feature datasets from a MapServer perspective? Thanks Chris On 24 August 2010 14:27, Lime, Steve D (DNR) steve.l...@state.mn.us wrote: How is the selection done? How is the highlighting done? Those processes will really impact performance depending on how things are implemented. Steve From: mapserver-users-boun...@lists.osgeo.org [ mapserver-users-boun...@lists.osgeo.org] On Behalf Of Chris Jackson [ webturt...@gmail.com] Sent: Tuesday, August 24, 2010 3:19 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Feature select performance Hi all I have rigged up a webGIS app (P.Mapper framework) where one of the underlying datasets is a model grid (many thousand cells) in a shapefile. The data displays nice and quick when just viewing, but if I allow the user to select say 5000 cells it is very (extremely) slow to redraw with the highlighted cells. Doing the same task in a very old ArcGIS server web app was much quicker (admittedly the data was in SDE/MS SQL). So my question is what is the best way to improve performance - would just transferring the shapefile to to say a MS SQL 2005 db with the MSSQLSPATIAL add-on be a good step or is there are better way to present the data in the Map file? Many thanks Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users