[mapserver-users] Re: Raster dataset recommendations
Hello Jean, You can use the gdal_retile.py script to generate the tiles and the zoom levels, than use the minscale and maxscale for showing and hiding the appropriate level. The raster data are not suggested to have them in a database or in your case in postgis. If they are file system it is faster, it is easier to maintain, to update tiles ect. You can see also other posts that give suggestion about file system vs database for raster data. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Raster-dataset-recommendations-tp6064491p6183710.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] MapServer and Guid USING UNIQUE
Hi Tamas, Ok, well thanks so much for trying! I wonder if we could create unique integer ID with a view - I have no idea if that is possible. Roger On Fri, Mar 18, 2011 at 11:09 AM, Tamas Szekeres szeker...@gmail.comwrote: Hi Roger, I came into the conclusion that supporting the uniqueidentifier is not possible with MapServer because the feature index is stored as int and we cannot convert the guid value to int. I'll revert the code to the original behaviour so MapServer will provide an error if the uniqueidentifier is used. For a workaround we could probably create an additional column with identity int or try to use checksum(PKey) instead of PKey in the layer configuration. Best regards, Tamas 2011/3/18 Roger Bedell sylvanasc...@gmail.com Hi Tamas, Try this, the UNIQUE is currently oid in the MAP file, and it should work. Change to PKey, and it should bomb. Roger On Thu, Mar 17, 2011 at 11:31 PM, Tamas Szekeres szeker...@gmail.comwrote: Hmmm. Just tried this and it works for me. Do you have a data/mapfile example to reproduce the problem? Best regards, Tamas 2011/3/17 Roger Bedell sylvanasc...@gmail.com Hi Tamas, I get this: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. when trying to use the UniqueIdentifier field as Unique. Same thing works fine using an integer field as Unique. Roger On Thu, Mar 17, 2011 at 9:19 PM, Roger Bedell sylvanasc...@gmail.comwrote: Sorry about that, I understand now. Development is trunk, -stable is fixes to the official release. I do this all the time with GeoServer, so one would think I'd learn.[?] Roger On Thu, Mar 17, 2011 at 9:08 PM, Tamas Szekeres szeker...@gmail.comwrote: Hi Roger, The package you mention contains the latest official release versions of MapServer and GDAL which has been released earlier and doesn't contain the fix, you should use the -stable branch versions instead. Best regards, Tamas 2011/3/17 Roger Bedell sylvanasc...@gmail.com Hi Tamas. I appreciate your help. I tried this one: http://vbkto.dyndns.org/sdk/Download.aspx?file=release-1600-gdal-1-8-0-mapserver-5-6-6.zip It seemed to me to be the latest stable. It works fine, except the fix for Guid doesn't seem to be in there. Roger On Thu, Mar 17, 2011 at 5:16 PM, Tamas Szekeres szeker...@gmail.com wrote: Roger, Which package did you try. The -stable branches (ie: http://vbkto.dyndns.org/sdk/PackageList.aspx?file=release-1600-gdal-1-8-mapserver-5-6.zip) should contain the fix. Best regards, Tamas 2011/3/17 Roger Bedell sylvanasc...@gmail.com Hi Tamas, I'm trying to get this working and ran into a couple snags. We are currently using mapscript_csharp.dll version 5.6.5 in a .NET program. 1) Tried to just copy just the msplugin_mssql2008.dll from your latest build from http://vbkto.dyndns.org/sdk/ - this didn't work, must have other dependencies, I didn't really think it would work. 2) Tried to use the latest build. Strangely, mapscript_csharp.dll doesn't seem to have the same objects as 5.6.5, and I got a bunch of unresolved references in the code. What do you think is the easiest way to get this working? Thanks, Roger Bedell Coordinate Solutions Inc. On Thu, Mar 10, 2011 at 12:56 PM, Tamas Szekeres szeker...@gmail.com wrote: Hi Roger, Could you create a ticket with this issue ( http://trac.osgeo.org/mapserver/newticket)? I'll take care of fixing this. Best regards, Tamas 2011/3/10 Roger Bedell sylvanasc...@gmail.com Thanks Till, however, here is the trace from the ODBC tracer, pretty obvious what is going on: DIAG [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Insufficient result space to convert uniqueidentifier value to char. (8170) Guids generally take up 36 characters when converted to a string, and the Select statement only has room for 20. Since this is a SQL specific query, my guess it is being generated in the sql spatial driver? Roger HSTMT 0x0589B310 UCHAR * 0x05E1A990 [ -3] SELECT Feature.STAsBinary(),convert(varchar(20), PKey) from MetesAndBoundsHeader WHERE Feature.STIntersects(Geometry::STGeomFromText('POLYGON((-104.18599 29.2473266843318,-93.22438 29.2473266843318,-93.22438 41.3707663156682,-104.18599 41.3707663156682,-104.18599 29.2473266843318))',4326)) = 1 \ 0 SDWORD-3 DIAG [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Insufficient result space to convert uniqueidentifier value to char. (8170) On Thu, Mar 10, 2011 at 12:04 PM, adams ad...@terrestris.dewrote: Dear Roger, if you get an empty image with no error, the first try would be to use a simple symbol and no expression in your layer. Also ensure, that your extent when querying the map is correct. So you make sure, that everything around your
Re: [mapserver-users] MapServer and Guid USING UNIQUE
I found this: SELECT (select count(*) from QQHeader where PKey=a.PKey) AS RowNo, a.* FROM QQHeader AS a from here: http://dbaspot.com/forums/sqlserver-server/355698-how-add-identity-column-view.html Seems to work fine in MapServer, but I don't know how well it will work in large tables though... Roger On Fri, Mar 18, 2011 at 11:41 AM, Roger Bedell sylvanasc...@gmail.comwrote: Hi Tamas, Ok, well thanks so much for trying! I wonder if we could create unique integer ID with a view - I have no idea if that is possible. Roger On Fri, Mar 18, 2011 at 11:09 AM, Tamas Szekeres szeker...@gmail.comwrote: Hi Roger, I came into the conclusion that supporting the uniqueidentifier is not possible with MapServer because the feature index is stored as int and we cannot convert the guid value to int. I'll revert the code to the original behaviour so MapServer will provide an error if the uniqueidentifier is used. For a workaround we could probably create an additional column with identity int or try to use checksum(PKey) instead of PKey in the layer configuration. Best regards, Tamas 2011/3/18 Roger Bedell sylvanasc...@gmail.com Hi Tamas, Try this, the UNIQUE is currently oid in the MAP file, and it should work. Change to PKey, and it should bomb. Roger On Thu, Mar 17, 2011 at 11:31 PM, Tamas Szekeres szeker...@gmail.comwrote: Hmmm. Just tried this and it works for me. Do you have a data/mapfile example to reproduce the problem? Best regards, Tamas 2011/3/17 Roger Bedell sylvanasc...@gmail.com Hi Tamas, I get this: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. when trying to use the UniqueIdentifier field as Unique. Same thing works fine using an integer field as Unique. Roger On Thu, Mar 17, 2011 at 9:19 PM, Roger Bedell sylvanasc...@gmail.comwrote: Sorry about that, I understand now. Development is trunk, -stable is fixes to the official release. I do this all the time with GeoServer, so one would think I'd learn.[?] Roger On Thu, Mar 17, 2011 at 9:08 PM, Tamas Szekeres szeker...@gmail.comwrote: Hi Roger, The package you mention contains the latest official release versions of MapServer and GDAL which has been released earlier and doesn't contain the fix, you should use the -stable branch versions instead. Best regards, Tamas 2011/3/17 Roger Bedell sylvanasc...@gmail.com Hi Tamas. I appreciate your help. I tried this one: http://vbkto.dyndns.org/sdk/Download.aspx?file=release-1600-gdal-1-8-0-mapserver-5-6-6.zip It seemed to me to be the latest stable. It works fine, except the fix for Guid doesn't seem to be in there. Roger On Thu, Mar 17, 2011 at 5:16 PM, Tamas Szekeres szeker...@gmail.com wrote: Roger, Which package did you try. The -stable branches (ie: http://vbkto.dyndns.org/sdk/PackageList.aspx?file=release-1600-gdal-1-8-mapserver-5-6.zip) should contain the fix. Best regards, Tamas 2011/3/17 Roger Bedell sylvanasc...@gmail.com Hi Tamas, I'm trying to get this working and ran into a couple snags. We are currently using mapscript_csharp.dll version 5.6.5 in a .NET program. 1) Tried to just copy just the msplugin_mssql2008.dll from your latest build from http://vbkto.dyndns.org/sdk/ - this didn't work, must have other dependencies, I didn't really think it would work. 2) Tried to use the latest build. Strangely, mapscript_csharp.dll doesn't seem to have the same objects as 5.6.5, and I got a bunch of unresolved references in the code. What do you think is the easiest way to get this working? Thanks, Roger Bedell Coordinate Solutions Inc. On Thu, Mar 10, 2011 at 12:56 PM, Tamas Szekeres szeker...@gmail.com wrote: Hi Roger, Could you create a ticket with this issue ( http://trac.osgeo.org/mapserver/newticket)? I'll take care of fixing this. Best regards, Tamas 2011/3/10 Roger Bedell sylvanasc...@gmail.com Thanks Till, however, here is the trace from the ODBC tracer, pretty obvious what is going on: DIAG [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Insufficient result space to convert uniqueidentifier value to char. (8170) Guids generally take up 36 characters when converted to a string, and the Select statement only has room for 20. Since this is a SQL specific query, my guess it is being generated in the sql spatial driver? Roger HSTMT 0x0589B310 UCHAR * 0x05E1A990 [ -3] SELECT Feature.STAsBinary(),convert(varchar(20), PKey) from MetesAndBoundsHeader WHERE Feature.STIntersects(Geometry::STGeomFromText('POLYGON((-104.18599 29.2473266843318,-93.22438 29.2473266843318,-93.22438 41.3707663156682,-104.18599 41.3707663156682,-104.18599 29.2473266843318))',4326)) = 1 \ 0 SDWORD-3 DIAG [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Insufficient
Re: [mapserver-users] MapServer and Guid USING UNIQUE
2011/3/18 Roger Bedell sylvanasc...@gmail.com I found this: SELECT (select count(*) from QQHeader where PKey=a.PKey) AS RowNo, a.* FROM QQHeader AS a The problem with this (and with the ROW_NUMBER option as well) is that the order of the rows may be undeterministic unless an orderby clause is used. I would rather suggest to use a function (either an UDF or the checksum) to create and integer is from guid. BTW: In the development version having an oid should not necessarily be a requirment in order to have the query option to work. So you may probably omit the using unique section in the layer definition (not tested by me). Best regards, Tamas ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Mapserver as back-end for Google custom streetview?
Hi all, I just published 200 panoramas I shot myself using the latest Google custom streetview API v3: http://www.diy-streetview.org/2011/03/17/google-streetview-player-for-diy-streetviews/ For this i added an overview map using div's. My camera used to shoot the 200 streetviews while walking, without even stopping, in just 20 minutes: http://www.diy-streetview.com I am looking for help to implement a back-end using http://mapserver.org. Any sugestions how to do this? Thanks, Jan Martin janmartin AT diy-streetview DOT org P.S.: Google custom streetview API: http://code.google.com/apis/maps/documentation/javascript/services.html#CustomStreetView -- http://www.DIY-streetview.org ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver as back-end for Google custom streetview?
if you purpose is to replace the google base layer with something different this might help http://wiki.openstreetmap.org/wiki/Google_Maps_Example#Example_Using_Google_Maps_API_V3 that allows you to use OSM as basemap. To use MapServer behind this rather than just getting from OSM, or CloudMade etc, you need to be able to serve Tiles from MapServer. see here for how to do that http://mapserver.org/output/tile_mode.html The references here are for GMap v2 so you will have to adapt the examples abit to work with GMap V3 On Fri, Mar 18, 2011 at 7:22 AM, Jan Martin janmar...@diy-streetview.org wrote: Hi all, I just published 200 panoramas I shot myself using the latest Google custom streetview API v3: http://www.diy-streetview.org/2011/03/17/google-streetview-player-for-diy-streetviews/ For this i added an overview map using div's. My camera used to shoot the 200 streetviews while walking, without even stopping, in just 20 minutes: http://www.diy-streetview.com I am looking for help to implement a back-end using http://mapserver.org. Any sugestions how to do this? Thanks, Jan Martin janmartin AT diy-streetview DOT org P.S.: Google custom streetview API: http://code.google.com/apis/maps/documentation/javascript/services.html#CustomStreetView -- http://www.DIY-streetview.org ___ 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] MapServer WMS and INSPIRE View Services development
FYI there has been some discussion with regard to enabling forthcoming INSPIRE [1] View Services support for MapServer WMS server. For MapServer WMS users in European Union member states, this support is vital in your WMS services. At the Montreal Code Sprint this week, we decided that it would be valuable to start a mailing list devoted to discussing requirements for INSPIRE support in MapServer WMS server. This can help in formulating the scope, requirements and level of effort for a future RFC. If you are interested in seeing INSPIRE support in MapServer WMS server, you are encouraged to join the mailing list at http://lists.osgeo.org/mailman/listinfo/mapserver-inspire. Thanks ..Tom [1] http://inspire.jrc.ec.europa.eu/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver as back-end for Google custom streetview?
Way simpler: I took about 200 panoramas, geotagged them and display them using Google custom streetview API, which is part of Google maps API v3: http://code.google.com/apis/maps/documentation/javascript/services.html#CustomStreetView For this I created 2 sets of data: a) Polyline for the blue roads on the map: var points = [ new google.maps.LatLng(49.994581,8.664265), new google.maps.LatLng(49.994636,8.666582), etc... ]; b) List of my custom streetviews: var panoramas = { '38': { latLng: new google.maps.LatLng(49.99434383656390, 8.66439325015278), description: '38', pano: '38', copyright: 'Imagery (c) 2011 DIY-streetview.com', tiles: { worldSize: new google.maps.Size(8192, 4096), tileSize: new google.maps.Size(512, 512), heading: 339 }, links: [ { heading: 159, description: '37', pano: '37', roadColor: '#C9BE62', roadOpacity: '0.3' }, { heading: 339, description: '39', pano: '39', roadColor: '#C9BE62', roadOpacity: '0.3' }]}, etc Obviously this does not scale. So I like to serve this data only using Mapserver. Tiles are from Google. How to do this? Thanks, Jan My working example: http://www.diy-streetview.org/2011/03/17/google-streetview-player-for-diy-streetviews/ On Fri, Mar 18, 2011 at 3:31 PM, Mark Korver mwkor...@gmail.com wrote: if you purpose is to replace the google base layer with something different this might help http://wiki.openstreetmap.org/wiki/Google_Maps_Example#Example_Using_Google_Maps_API_V3 that allows you to use OSM as basemap. To use MapServer behind this rather than just getting from OSM, or CloudMade etc, you need to be able to serve Tiles from MapServer. see here for how to do that http://mapserver.org/output/tile_mode.html The references here are for GMap v2 so you will have to adapt the examples abit to work with GMap V3 On Fri, Mar 18, 2011 at 7:22 AM, Jan Martin janmar...@diy-streetview.org wrote: Hi all, I just published 200 panoramas I shot myself using the latest Google custom streetview API v3: http://www.diy-streetview.org/2011/03/17/google-streetview-player-for-diy-streetviews/ For this i added an overview map using div's. My camera used to shoot the 200 streetviews while walking, without even stopping, in just 20 minutes: http://www.diy-streetview.com I am looking for help to implement a back-end using http://mapserver.org . Any sugestions how to do this? Thanks, Jan Martin janmartin AT diy-streetview DOT org P.S.: Google custom streetview API: http://code.google.com/apis/maps/documentation/javascript/services.html#CustomStreetView -- http://www.DIY-streetview.org ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- http://www.DIY-streetview.org ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Problems getting started with POSTGIS
I've been using MapServer with shapefiles for some time. I'm trying to convert a site to PostGIS, and I'm having problems. I've successfully installed PostGIS on my Ubunto 10.04 box, and copied a number of shapefiles into it, using shp2pgsql. I can view the new tables using qGIS, so I'm sure the data is right. So now I've copies a mapfile that was working against the original shapefiles, and I'm trying to convert it to use PostGIS. I'm working on just one layer, and I'm trying to test that layer with shp2img. I've added to the LAYER definition: LAYER NAME countyboundaries CONNECTIONTYPE postgis CONNECTION host=localhost dbname=test_db user=gis password=x DATA the_geom from gis_schema.county [...] END As I said, I know the data is in the database, because I can load it as a PostGIS layer from qGIS. Column and table names are right, because when I run select the_geom from gis_schema.county in the query tool I get the data. But when I run shp2img from the commandline, I get an error: $ shp2img -m test.map -o test.gif -i GIF -l countyboundaries msDrawMap(): Image handling error. Failed to draw layer named 'countyboundaries'. msPostGISParseData(): Query error. Error parsing PostGIS DATA variable. Must contain 'geometry from table' or 'geometry from (subselect) as foo'. County shp2img is MapServer version 5.6.6, and the output from -v does contain INPUT=POSTGIS. Any ideas? I'm trying to keep things simple, and it's frustrating when simple doesn't work. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] First SouthAmerican FOSS4G Conference
Hi all, I am presenting the First SouthAmerican FOSS4G Conference, will be held at the Mayor University in 8th April 2011 we will have presentations about OSGeo Foundation and OSM, gvSIG, among others. Help us to promote it, see the twitter and facebook page.http://twitter.com/Foss4g_chile and http://www.facebook.com/?ref=logo#!/profile.php?id=12192893828 More information about the conference http://www.foss4gchile.org/blog/primer-foss4g-sudamericano/ kinds RegardsOrganizer Committee1st SouthAmerican FOSS4G Conference ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Problems getting started with POSTGIS
On 3/18/2011 11:52 AM, Jeff Dege wrote: I’ve been using MapServer with shapefiles for some time. I’m trying to convert a site to PostGIS, and I’m having problems. I’ve successfully installed PostGIS on my Ubunto 10.04 box, and copied a number of shapefiles into it, using shp2pgsql. I can view the new tables using qGIS, so I’m sure the data is right. So now I’ve copies a mapfile that was working against the original shapefiles, and I’m trying to convert it to use PostGIS. I’m working on just one layer, and I’m trying to test that layer with shp2img. I’ve added to the LAYER definition: LAYER NAME “countyboundaries” CONNECTIONTYPE postgis CONNECTION “host=localhost dbname=test_db user=gis password=x” DATA “the_geom from gis_schema.county” […] END As I said, I know the data is in the database, because I can load it as a PostGIS layer from qGIS. Column and table names are right, because when I run “select the_geom from gis_schema.county” in the query tool I get the data. But when I run shp2img from the commandline, I get an error: $ shp2img -m test.map -o test.gif -i GIF -l countyboundaries msDrawMap(): Image handling error. Failed to draw layer named ‘countyboundaries’. msPostGISParseData(): Query error. Error parsing PostGIS DATA variable. Must contain ‘geometry from table’ or ‘geometry from (subselect) as foo’. County shp2img is MapServer version 5.6.6, and the output from -v does contain “INPUT=POSTGIS”. Any ideas? I’m trying to keep things simple, and it’s frustrating when simple doesn’t work. I cant see anything really wrong. I'm doing mostly the same thing. however: CONNECTION “dbname=test_db user=gis password=x” because mapserver and PG run on the same box, I left off the host=localhost... not sure if its important. DATA the_geom from gis_schema.county using unique gid using srid=-1 I also have the unique and srid things, again not sure if there'd be a difference. And as a last hint, you can try bumping up the debug: MAP CONFIG MS_ERRORFILE /tmp/mapserver.log ... LAYER DEBUG 4 ... END -Andy ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] MapServer 6.0.0-beta2 release
Thanks to the hard work from everyone during the Montreal Code Sprint this week (http://wiki.osgeo.org/wiki/Montreal_Code_Sprint_2011), the MapServer Team is pleased to announce the release of MapServer 6.0.0-beta2. This is the latest beta on our way to a final 6.0 release, and includes a large number of fixes made during the Montreal Code Sprint. The 6.0 release introduces important changes in key components of the MapServer core (rendering, query and expressions), and for this reason we count on you, MapServer power users, to help test the release in your respective environments and provide feedback (through the users list or Trac tickets). This is the second of four planned beta releases and if all goes well a final release should occur around the end of April. The full release plan which also includes the list of new features and changes in this release is available at: http://mapserver.org/trunk/development/release/release-plan-6.0.html The list of fixes since beta1 is attached at the end of this message. For a complete list see the HISTORY.TXT file at: http://trac.osgeo.org/mapserver/browser/tags/rel-6-0-0-beta2/mapserver/HISTORY.TXT We have started working on a 5.6 - 6.0 migration guide. This document contains important notes on backwards incompatibilities or other changes required when upgrading to 6.0. It is not complete yet but we strongly recommend that you review the latest version online at: http://mapserver.org/trunk/MIGRATION_GUIDE.html The source for this release can be downloaded at: http://mapserver.org/download.html or http://download.osgeo.org/mapserver/mapserver-6.0.0-beta2.tar.gz The binary distributions listed in the download page should be updated with binaries for the new beta release in the next day or so. Once again we need your help to ensure a high quality product, so please help out by testing your applications with this new code base. Thanks! - The MapServer Team Version 6.0.0-beta2 (2011-03-18) - correct scaling of symbol GAP and PATTERN (#3752) - remove references to SWF/MING - CGI runtime substitution requires a validation pattern (was optional before) (#3522) - add a default png8 outputformat that uses AGG/PNG with quantization - change MS_INIT_COLOR to take alpha as a parameter - stop using style-opacity in rendering code, use alpha from colorObjs. - Fixed big Oracle memory leak when rendering in KML (#3719) - avoid linking in postgres dependencies unnecessarily (#3708) - don't initialize outputformats until they are selected - use seamless creation of tiles for polygon fills with vector symbols - Ability to escape single/double quotes inside a string (#3706) - Globally replace msCaseFindSubstring with strcasestr (#3255) - support GROUP layers in shp2img (#3746) - Honour MAXSIZE for WCS 2.0 responses (#3204). - fallback to ows_title for WCS ows:Title of CoverageDescription (#3528) - Added msIO_stripStdoutBufferContentHeaders() to strip off all Content-* headers from a buffer (#3673, #3665). - Added raster classification support for STYLE level OPACITY. - Allow attribute references, that is [itemname], within a TEXT string (#3736) - Fixed segmentation fault when parsing invalid extent arguments in shp2img (#3734) - Make openlayers mode work even without OWS support (#3732) - Add a static table to define the axis order for soem epsg codes (#3582) - Add possibility to use KML_NAME_ITEM (#3728) - Fixed mapfile parsing error when a label angle referenced an attribute (e.g. ANGLE [angle]) #3727 - Removed executable flag on some source files (#3726) - Fixed SQL Spatial to be able to use UniqueIdentifier field as unique key (#3722) - Fix PHP Windows build (#3714) - Fixed --with-opengl build issue: Look for OpenGL libs under /usr/lib64 as well (#3724) ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Querying a WMS layer with data input from MySQL?
Hi, I'm a new user of MapServer. So far I've mainly used it to display ShapeFiles via WMS on an OpenLayers application I'm developing. I now have polygons stored in a MySQL table (stored as a WKT format in a POLYGON column). I'm able to display it as a layer just fine via a WMS request, but I want to be able to display a specific polygon from a row. That is, I want to be able to query the MySQL data input when requesting this layer. Right now, I have something like this in my Mapfile for the Layer parameter: TYPEPOLYGON CONNECTIONTYPE OGR CONNECTION MySQL:customtable,user=user,password= DATA SELECT custom_polygon FROM mytable WHERE fid=2 I want to be able to perform a WMS request with parameters that can allow me to query the layer (where fid can be changed). For example: http://www.server.com/cgi-bin/mapserv?REQUEST=GetMapSERVICE=WMSFORMAT=image/png...LAYERS=custompoly...fid=33;... Can this sort of thing be done on MapServer? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Querying-a-WMS-layer-with-data-input-from-MySQL-tp6186251p6186251.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] Re: Querying a WMS layer with data input from MySQL?
I've noticed that something I'm asking can be done with this example from iNWS, so I thought I'd ask how: http://inws.wrh.noaa.gov/cgi-bin/wms_iNWS?alert_area_custom_filter=id%3D0+or+id%3D26715alert_area_county_filter=id%3D0product_segment_filter=id=399374HEIGHT=500WIDTH=500LAYERS=radar,counties,states,roads,product_segment,alert_area_county,alert_area_custom,citiesradar_time=2011-03-13T18%3A00%3A00ZSRS=EPSG:900913STYLES=FORMAT=image/pngTILED=falseSERVICE=WMSVERSION=1.1.1REQUEST=GetMapEXCEPTIONS=application/vnd.ogc.se_inimageBBOX=-13861560.5,5832312,-13408652.5,6285220 -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Querying-a-WMS-layer-with-data-input-from-MySQL-tp6186251p6186263.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] Problems getting started with POSTGIS
On 3/18/2011 3:41 PM, Andy Colson wrote: On 3/18/2011 11:52 AM, Jeff Dege wrote: I’ve been using MapServer with shapefiles for some time. I’m trying to convert a site to PostGIS, and I’m having problems. I’ve successfully installed PostGIS on my Ubunto 10.04 box, and copied a number of shapefiles into it, using shp2pgsql. I can view the new tables using qGIS, so I’m sure the data is right. So now I’ve copies a mapfile that was working against the original shapefiles, and I’m trying to convert it to use PostGIS. I’m working on just one layer, and I’m trying to test that layer with shp2img. I’ve added to the LAYER definition: LAYER NAME “countyboundaries” CONNECTIONTYPE postgis CONNECTION “host=localhost dbname=test_db user=gis password=x” DATA “the_geom from gis_schema.county” […] END As I said, I know the data is in the database, because I can load it as a PostGIS layer from qGIS. Column and table names are right, because when I run “select the_geom from gis_schema.county” in the query tool I get the data. But when I run shp2img from the commandline, I get an error: $ shp2img -m test.map -o test.gif -i GIF -l countyboundaries msDrawMap(): Image handling error. Failed to draw layer named ‘countyboundaries’. msPostGISParseData(): Query error. Error parsing PostGIS DATA variable. Must contain ‘geometry from table’ or ‘geometry from (subselect) as foo’. County shp2img is MapServer version 5.6.6, and the output from -v does contain “INPUT=POSTGIS”. Any ideas? I’m trying to keep things simple, and it’s frustrating when simple doesn’t work. I cant see anything really wrong. I'm doing mostly the same thing. however: CONNECTION “dbname=test_db user=gis password=x” because mapserver and PG run on the same box, I left off the host=localhost... not sure if its important. Yes, it might be, it depends on how postgresql is configured. You can test it with: psql -U gis test_db vs: psql -U gis -h localhost test_db DATA the_geom from gis_schema.county using unique gid using srid=-1 I also have the unique and srid things, again not sure if there'd be a difference. This also might be a problem. In general you should not use srid=-1 in the database of in the mapfile. When you load your data you should specify the correct srid and reference in the mapfile. in your mapfile add: MAP CONFIG MS_ERRORFILE stderr DEBUG 10 then run your shp2img again and you might get more debug info. You can also add the DEBUG 10 to you LAYER and I think it will spit out the SQL it is trying to execute so you can try it in psql and maybe get helpful messages there. -Steve W And as a last hint, you can try bumping up the debug: MAP CONFIG MS_ERRORFILE /tmp/mapserver.log ... LAYER DEBUG 4 ... END -Andy ___ 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] Problems getting started with POSTGIS
I'm not seeing the query - I don't think I'm getting that far. msPostGISWhichShapes called. msPostGISParseData called. msPostGISParseData(): Query error. Error parsing PostGIS DATA variable. Must contain 'geometry from table' or geometry from (subselect) as Foo'. County But playing around, I saw that I was getting the same error regardless of what I put in the DATA variable. Which made no sense. I tried stuff that should not have worked at all, and saw no difference. So I looked beyond my problematic DATA variable - and found another DATA variable, later in the LAYER definition. If you remember, I started this by copying a mapfile that had been working with shapefiles. I'd changed the CONNECTIONTYPE, added a CONNECTION, and a new DATA - but I hadn't deleted the old DATA. Oops. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen Woodbridge Sent: Friday, March 18, 2011 4:44 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Problems getting started with POSTGIS On 3/18/2011 3:41 PM, Andy Colson wrote: On 3/18/2011 11:52 AM, Jeff Dege wrote: I've been using MapServer with shapefiles for some time. I'm trying to convert a site to PostGIS, and I'm having problems. I've successfully installed PostGIS on my Ubunto 10.04 box, and copied a number of shapefiles into it, using shp2pgsql. I can view the new tables using qGIS, so I'm sure the data is right. So now I've copies a mapfile that was working against the original shapefiles, and I'm trying to convert it to use PostGIS. I'm working on just one layer, and I'm trying to test that layer with shp2img. I've added to the LAYER definition: LAYER NAME countyboundaries CONNECTIONTYPE postgis CONNECTION host=localhost dbname=test_db user=gis password=x DATA the_geom from gis_schema.county [...] END As I said, I know the data is in the database, because I can load it as a PostGIS layer from qGIS. Column and table names are right, because when I run select the_geom from gis_schema.county in the query tool I get the data. But when I run shp2img from the commandline, I get an error: $ shp2img -m test.map -o test.gif -i GIF -l countyboundaries msDrawMap(): Image handling error. Failed to draw layer named 'countyboundaries'. msPostGISParseData(): Query error. Error parsing PostGIS DATA variable. Must contain 'geometry from table' or 'geometry from (subselect) as foo'. County shp2img is MapServer version 5.6.6, and the output from -v does contain INPUT=POSTGIS. Any ideas? I'm trying to keep things simple, and it's frustrating when simple doesn't work. I cant see anything really wrong. I'm doing mostly the same thing. however: CONNECTION dbname=test_db user=gis password=x because mapserver and PG run on the same box, I left off the host=localhost... not sure if its important. Yes, it might be, it depends on how postgresql is configured. You can test it with: psql -U gis test_db vs: psql -U gis -h localhost test_db DATA the_geom from gis_schema.county using unique gid using srid=-1 I also have the unique and srid things, again not sure if there'd be a difference. This also might be a problem. In general you should not use srid=-1 in the database of in the mapfile. When you load your data you should specify the correct srid and reference in the mapfile. in your mapfile add: MAP CONFIG MS_ERRORFILE stderr DEBUG 10 then run your shp2img again and you might get more debug info. You can also add the DEBUG 10 to you LAYER and I think it will spit out the SQL it is trying to execute so you can try it in psql and maybe get helpful messages there. -Steve W And as a last hint, you can try bumping up the debug: MAP CONFIG MS_ERRORFILE /tmp/mapserver.log ... LAYER DEBUG 4 ... END -Andy ___ 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 mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users