Re: [mapserver-users] postgis layer - postgresql table join eror
You're missing a FROM clause, probably something like: DATA 'the_geom FROM (SELECT Pipeline.the_geom AS the_geom, Pipeline.gid AS gid, Pipeline.status AS status, Kondur_block.id_wk AS id_wk FROM Pipeline LEFT JOIN Kondur_block ON Pipeline.id_wk = Kondur_block.id_wk) as subquery USING UNIQUE gid USING srid=32648' -- thomas On Mon, Aug 13, 2012 at 6:21 AM, Surahman Putra surahmanpu...@gmail.com wrote: Hi I’m new mapserver-user. I have problem to join postgis layer to postgre table. Here my map file data: DATA 'the_geom FROM (SELECT Pipeline.the_geom AS the_geom, Pipeline.gid AS gid, Pipeline.status AS status, Kondur_block.id_wk AS id_wk LEFT JOIN Kondur_block ON Pipeline.id_wk = Kondur_block.id_wk) as subquery USING UNIQUE gid USING srid=32648' And I get this message: msDrawMap(): Image handling error. Failed to draw layer named 'Pipeline'. msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR: syntax error at or near LEFT LINE 1: status AS status, Kondur_block.id_wk AS id_wk LEFT JOIN ... ^ Can annyone sugget what’s wrong with that? For Information I use mapserver version 6.03 and postgis version 1.5.1 Thanks, Surahman ___ 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] postgis layer - postgresql table join eror
Thanks Thomas, But After I add FROM clause, it still give same message. Do you have any idea what should I do to fix this problem? Surahman On Mon, Aug 13, 2012 at 2:26 PM, thomas bonfort thomas.bonf...@gmail.comwrote: You're missing a FROM clause, probably something like: DATA 'the_geom FROM (SELECT Pipeline.the_geom AS the_geom, Pipeline.gid AS gid, Pipeline.status AS status, Kondur_block.id_wk AS id_wk FROM Pipeline LEFT JOIN Kondur_block ON Pipeline.id_wk = Kondur_block.id_wk) as subquery USING UNIQUE gid USING srid=32648' -- thomas On Mon, Aug 13, 2012 at 6:21 AM, Surahman Putra surahmanpu...@gmail.com wrote: Hi I’m new mapserver-user. I have problem to join postgis layer to postgre table. Here my map file data: DATA 'the_geom FROM (SELECT Pipeline.the_geom AS the_geom, Pipeline.gid AS gid, Pipeline.status AS status, Kondur_block.id_wk AS id_wk LEFT JOIN Kondur_block ON Pipeline.id_wk = Kondur_block.id_wk) as subquery USING UNIQUE gid USING srid=32648' And I get this message: msDrawMap(): Image handling error. Failed to draw layer named 'Pipeline'. msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR: syntax error at or near LEFT LINE 1: status AS status, Kondur_block.id_wk AS id_wk LEFT JOIN ... ^ Can annyone sugget what’s wrong with that? For Information I use mapserver version 6.03 and postgis version 1.5.1 Thanks, Surahman ___ 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] RV: Mapserver ignores classgroup parameters for raster layers?
ok, I would try the 6.2, thanks De: Lime, Steve D (DNR) [steve.l...@state.mn.us] Enviado el: viernes, 10 de agosto de 2012 16:49 Para: San Segundo Navazo, Helen; mapserver-users@lists.osgeo.org Asunto: RE: [mapserver-users] Mapserver ignores classgroup parameters for raster layers? I believe this has been fixed in 6.2. Can you try the latest beta? --Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Helen San Segundo Navazo Sent: Friday, August 10, 2012 2:42 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Mapserver ignores classgroup parameters for raster layers? I'm using mapserver 6.0.2 and I've defined a raster layer with different classgroup styles. When I invoke the different styles only uses the first defined in the mapfile. I've seen some tickets whith this problem, anybody knows how to make classgroup work with raster layers? Thanks, Helen ___ 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] The GetFeatureInfo return a GML without a validation schema.
Andrea Peri wrote: Hi, If GetFeatureInfo would produce GML with different schema than WFS GetFeature, how the users are supposed to read it? WMS does not have request DescribeGetFeatureInfoSchema and building such for Mapserver does not feel optimal. So the GetFeatureInfo GML should have a link to a static schema file that could be accessed through the web. Yes this was an option, but it is not the only. Another option could be an Inline XML. It is an XML with it xsd embedded. http://www.herongyang.com/XML/XSD-Statements-Embedded-in-XML-File.html GDAL/OGR can write such GML files but documentation warns that they may not be valid. You can try with ogr2ogr for example with the following command. If there is some troubles with my WFS you can use any other vector format as input. ogr2ogr -f GML -dsco XSISCHEMA=INTERNAL test.gml wfs:http://hip.latuviitta.org/cgi-bin/tinyows; -sql select * from municipalities where kunta_ni1='Helsinki' If the resulting GML seems good to you I would guess that someone here can tell how to configure Mapserver to use that kind of output for GetFeatureInfo. Formatoptions in OGR output settings seem promising to me http://mapserver.org/output/ogr_output.html How about forgetting GML and use something that does not need separate schema file, perhaps GeoJSON? I guess GeoJSon is no a consolidated standard. So I guess the GeoJSON generated from geoServer is different from the GeoJSON of MapServer or of other products. Our goal is to write routines able to speak with MapServer mainly with MapServer but also with GeoServer or others WMS systems. The routins must be able to retrieve attributes and geometry. We don't want use the WFS because it is too much oriented to a download. It is not lockable to give one only instance (one only geometry) I am not a specialist with standards but if GeoJSON and JSON standards together take something like 430 pages less than GML it is possible that there are less possibilities for different interpretations. http://geojson.org/geojson-spec.html http://www.ietf.org/rfc/rfc4627.txt http://www.opengeospatial.org/standards/gml If you are going to discuss with servers which are not managed by yourself you may meet some troubles with WMS GetFeatureInfo. WMS standard says very little about GetFeatureInfo output formats. Mainly it is just that the formats must be advertised in the WMS GetCapabilities. Limiting results from WFS to only one result is not a problem, you need just add MAXFEATURES=1 to the request. The main problem when it comes to interactive web mapping use is that WFS does not have request for getting the closest feature from a given coordinate. -Jukka Rahkonen- 2012/8/10 Rahkonen Jukka jukka.rahko...@mmmtike.fi Hi, DescribeFeatureType is compulsory part of WSF so it is no wonder that it works automatically. I try to think what could be done. DecribeFeatureType must match with WFS GetFeature. It you would like to use DFT with WMS GetFeatureInfo then GetFeatureInfo could not be separately configurable. It should always use the schema defined for WFS. I suppose that this is how Geoserver works. I also believe that there are Mapserver users who want to get different GML from WFS GetFeature and WMS GetFeatureInfo. If GetFeatureInfo would produce GML with different schema than WFS GetFeature, how the users are supposed to read it? WMS does not have request DescribeGetFeatureInfoSchema and building such for Mapserver does not feel optimal. So the GetFeatureInfo GML should have a link to a static schema file that could be accessed through the web. OGR GML driver seems to be able to create such schema file automatically with XSISCHEMA=EXTERNAL option http://gdal.org/ogr/drv_gml.html. Problem is that probably you do not want to send two files for the WMS client doing GetFeatureInfo calls (xml + xsd), not even zipped into one archive file. So OGR should generate .xsd file, store it into some place on the server and write a corresponging URL into the GML part of response so that client could read the file through the web. It feels complicated but probably it could be done. XSISCHEMA=INTERNAL would be much more simple both on the server and client side but documentation tells that it does not work. How about forgetting GML and use something that does not need separate schema file, perhaps GeoJSON? -Jukka- Andrea Peri wrote: Hi Jukka, That option ask the user to produce itself all the schemas for all the layers I see instead that a getFeature request on the WFS section will produce automatically an xsd of the GML it return using the DescribeFeatureType request. I hope to find a solution to have this automatically produce also on the GetFeatureInfo. 2012/8/10 Rahkonen Jukka jukka.rahko...@mmmtike.fi Hi, Would it work as you hope if the creation option XSISCHEMAURI could be set as described in the OGR GML driver page http://gdal.org/ogr/drv_gml.html?
Re: [mapserver-users] RV: Mapserver ignores classgroup parameters for raster layers?
hi, with the 6.2 beta2 version the classgroup with raster layers works. Helen El 13/08/12 10:54, Helen San Segundo Navazo escribió: ok, I would try the 6.2, thanks De: Lime, Steve D (DNR) [steve.l...@state.mn.us] Enviado el: viernes, 10 de agosto de 2012 16:49 Para: San Segundo Navazo, Helen; mapserver-users@lists.osgeo.org Asunto: RE: [mapserver-users] Mapserver ignores classgroup parameters for raster layers? I believe this has been fixed in 6.2. Can you try the latest beta? --Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Helen San Segundo Navazo Sent: Friday, August 10, 2012 2:42 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Mapserver ignores classgroup parameters for raster layers? I'm using mapserver 6.0.2 and I've defined a raster layer with different classgroup styles. When I invoke the different styles only uses the first defined in the mapfile. I've seen some tickets whith this problem, anybody knows how to make classgroup work with raster layers? Thanks, Helen ___ 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
Re: [mapserver-users] postgis layer - postgresql table join eror
Make sure you sub-query works ins psql or pgadmin first. You care getting a SQL error not a mapserver error. SELECT Pipeline.the_geom AS the_geom, Pipeline.gid AS gid, Pipeline.status AS status, Kondur_block.id_wk AS id_wk FROM Pipeline LEFT JOIN Kondur_block ON Pipeline.id_wk = Kondur_block.id_wk If this does wotk there it will not work in mapserver. -Steve W On 8/13/2012 4:24 AM, surahman putra wrote: Thanks Thomas, But After I add FROM clause, it still give same message. Do you have any idea what should I do to fix this problem? Surahman On Mon, Aug 13, 2012 at 2:26 PM, thomas bonfort thomas.bonf...@gmail.com mailto:thomas.bonf...@gmail.com wrote: You're missing a FROM clause, probably something like: DATA 'the_geom FROM (SELECT Pipeline.the_geom AS the_geom, Pipeline.gid AS gid, Pipeline.status AS status, Kondur_block.id_wk AS id_wk FROM Pipeline LEFT JOIN Kondur_block ON Pipeline.id_wk = Kondur_block.id_wk) as subquery USING UNIQUE gid USING srid=32648' -- thomas On Mon, Aug 13, 2012 at 6:21 AM, Surahman Putra surahmanpu...@gmail.com mailto:surahmanpu...@gmail.com wrote: Hi I’m new mapserver-user. I have problem to join postgis layer to postgre table. Here my map file data: DATA 'the_geom FROM (SELECT Pipeline.the_geom AS the_geom, Pipeline.gid AS gid, Pipeline.status AS status, Kondur_block.id_wk AS id_wk LEFT JOIN Kondur_block ON Pipeline.id_wk = Kondur_block.id_wk) as subquery USING UNIQUE gid USING srid=32648' And I get this message: msDrawMap(): Image handling error. Failed to draw layer named 'Pipeline'. msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR: syntax error at or near LEFT LINE 1: status AS status, Kondur_block.id_wk AS id_wk LEFT JOIN ... ^ Can annyone sugget what’s wrong with that? For Information I use mapserver version 6.03 and postgis version 1.5.1 Thanks, Surahman ___ mapserver-users mailing list mapserver-users@lists.osgeo.org mailto: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
[mapserver-users] php extension
mapserver is working, decided to give the php extension a whirl but this error has me baffled PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_mapscript.so' - /usr/lib64/php/modules/php_mapscript.so: undefined symbol: DGifGetScreenDesc in Unknown on line 0 -- -Jeff Lake MichiganWxSystem.com WeatherMichigan.net TheWeatherCenter.net GRLevelXStuff.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] php extension
On 12-08-13 10:19 AM, Jeff Lake wrote: mapserver is working, decided to give the php extension a whirl but this error has me baffled PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_mapscript.so' - /usr/lib64/php/modules/php_mapscript.so: undefined symbol: DGifGetScreenDesc in Unknown on line 0 Maybe your system requires the Giflib package as well? Not sure. -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
Re: [mapserver-users] php extension
On Mon, Aug 13, 2012 at 8:19 AM, Jeff Lake ad...@michiganwxsystem.com wrote: mapserver is working, decided to give the php extension a whirl but this error has me baffled PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_mapscript.so' - /usr/lib64/php/modules/php_mapscript.so: undefined symbol: DGifGetScreenDesc in Unknown on line 0 Jeff, Which operating system? What does ldd /usr/lib64/php/modules/php_mapscript.so report? daryl ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] php extension
hey Daryl... centos 5.8 64bit ldd /usr/lib64/php/modules/php_mapscript.so linux-vdso.so.1 = (0x7fff1e29a000) libexpat.so.0 = /lib64/libexpat.so.0 (0x2aef63c38000) libgd.so.2 = /usr/lib64/libgd.so.2 (0x2aef63e5b000) libjpeg.so.62 = /usr/lib64/libjpeg.so.62 (0x2aef640b) libfreetype.so.6 = /usr/lib64/libfreetype.so.6 (0x2aef642d1000) libpng12.so.0 = /usr/lib64/libpng12.so.0 (0x2aef64555000) libz.so.1 = /lib64/libz.so.1 (0x2aef6477a000) libstdc++.so.6 = /usr/lib64/libstdc++.so.6 (0x2aef6498e000) libm.so.6 = /lib64/libm.so.6 (0x2aef64c8e000) libc.so.6 = /lib64/libc.so.6 (0x2aef64f12000) libgcc_s.so.1 = /lib64/libgcc_s.so.1 (0x2aef65269000) libXpm.so.4 = /usr/lib64/libXpm.so.4 (0x2aef65477000) libX11.so.6 = /usr/lib64/libX11.so.6 (0x2aef65689000) libfontconfig.so.1 = /usr/lib64/libfontconfig.so.1 (0x2aef65995000) /lib64/ld-linux-x86-64.so.2 (0x00310ce0) libXau.so.6 = /usr/lib64/libXau.so.6 (0x2aef65bca000) libXdmcp.so.6 = /usr/lib64/libXdmcp.so.6 (0x2aef65dcc000) libdl.so.2 = /lib64/libdl.so.2 (0x2aef65fd1000) -Jeff Lake MichiganWxSystem.com WeatherMichigan.net TheWeatherCenter.net GRLevelXStuff.com On 8/13/2012 12:20, Daryl Herzmann wrote: ldd /usr/lib64/php/modules/php_mapscript.so ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Projection library error. no options found in 'init' file
I am, out of the blue, getting the following error [Mon Aug 13 15:55:37 2012].825787 msProcessProjection(): Projection library error. no options found in 'init' file What is it trying to tell me? This was working fine as of a few days ago, and I don't recall messing with it. -- Puneet Kishor ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Projection library error. no options found in 'init' file
On 12-08-13 5:03 PM, Puneet Kishor wrote: I am, out of the blue, getting the following error [Mon Aug 13 15:55:37 2012].825787 msProcessProjection(): Projection library error. no options found in 'init' file What is it trying to tell me? This was working fine as of a few days ago, and I don't recall messing with it. The EPSG code you are trying to use is not defined in your 'epsg' file: http://mapserver.org/errors.html#msprocessprojection-no-options-found-in-init-file -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Projection library error. no options found in 'init' file
On 8/13/2012 5:03 PM, Puneet Kishor wrote: I am, out of the blue, getting the following error [Mon Aug 13 15:55:37 2012].825787 msProcessProjection(): Projection library error. no options found in 'init' file What is it trying to tell me? This was working fine as of a few days ago, and I don't recall messing with it. Did you update your proj lib? If you did it probably replaced your /usr/share/proj/epsg file and you have lost and changes you made to it. If you have init=epsg:900913 then this is looking for the file: /usr/share/proj/epsg or maybe: /usr/local/share/proj/epsg the epsg in the init string is case sensitive file name. And the 900913 or whatever code must exist in that file. The error message is saying it could not find the file or the SRS you specified. -Steve W ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Projection library error. no options found in 'init' file
Never mind I upgraded macports, and that whacked my epsg file. Restored that, and am back in bidness. On Aug 13, 2012, at 4:03 PM, Puneet Kishor punk.k...@gmail.com wrote: I am, out of the blue, getting the following error [Mon Aug 13 15:55:37 2012].825787 msProcessProjection(): Projection library error. no options found in 'init' file What is it trying to tell me? This was working fine as of a few days ago, and I don't recall messing with it. -- Puneet Kishor ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] postgis layer - postgresql table join eror
I have change the SQL to this one: SELECT Pipeline.the_geom AS the_geom, Pipeline.gid AS gid, Pipeline.status AS status, Kondur_block.id_wk AS id_wk FROMPipeline LEFT JOIN Kondur_block ON Pipeline.id_wk = Kondur_block.id_wk and it works on psql, but when I tried that SQL to map file, it give me this message: msDrawMap(): Image handling error. Failed to draw layer named 'Pipeline'. msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR: syntax error at or near Pipeline LINE 1: ...e(ST_AsBinary(ST_Force_2D(the_geom FROM (SELECT Pipeline ^ What I am missing on my mapfile? here is my mapfile : CONNECTIONTYPE postgis CONNECTION dbname='Melibur' host=localhost port=5432 user=' ' password=' ' sslmode=disable DATA 'the_geom FROM (SELECT Pipeline.the_geom AS the_geom, Pipeline.gid AS gid, Pipeline.status AS status, Kondur_block.id_wk AS id_wk FROM Pipeline LEFT JOIN Kondur_block ON Pipeline.id_wk = Kondur_block.id_wk) as subquery USING UNIQUE gid USING srid=32648' Thanks, Surahman ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] php mapscript querymap doesnt highlight
Hi, I'm trying to highlight the queried shape, using mapscript. It doesn't work if I include the querymap in the mapfile QUERYMAP STATUS ON STYLE HILITE END and it doesn't work in the php file $map-querymap-set('style', 2); Can someone please give me an example of how to do this? the feature id is read from the url. I think I'm missing something really obvious here. Cheers, Jess --- Forestry creates regional employment: http://youtu.be/UBIUGiCiX00 Growing tomorrow's high conservation value forests: http://www.youtube.com/watch?v=wP6XCailI-A ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users