[mapserver-users] Fw: mapserver-users Digest, Vol 42, Issue 60
uur p Verzonden vanaf Samsung Mobile Oorspronkelijk bericht Onderwerp: mapserver-users Digest, Vol 42, Issue 60 Van: mapserver-users-requ...@lists.osgeo.org Aan: mapserver-users@lists.osgeo.org Cc: 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. Re: How to convert from 2393(Finish YKJ) to 4326 (WGS84) (Rahkonen Jukka) 2. Question: loadWeb(): Unknown identifier. Parsing error near (ms_tmp):(line 36) (Mihaela Caluian) 3. Re: Question: loadWeb(): Unknown identifier. Parsing error near (ms_tmp):(line 36) (Steve Lime) 4. Fw: Re: [mapserver-users] How to convert from 2393(Finish YKJ) to 4326 (WGS84) (Pena Kupen) -- Message: 1 Date: Sun, 24 Jul 2011 17:16:46 + From: Rahkonen Jukka jukka.rahko...@mmmtike.fi Subject: Re: [mapserver-users] How to convert from 2393(Finish YKJ) to 4326(WGS84) To: Pena Kupen ku...@wippies.fi, mapserver-users@lists.osgeo.org mapserver-users@lists.osgeo.org Message-ID: 84446def76453c439e9e97e438e13a63015...@suutari.haapa.mmm.fi Content-Type: text/plain; charset=iso-8859-1 Hi, I suppose that towgs84 parameters are missing. You can check this with psql: select proj4text from spatial_ref_sys where srid=2393; The result should be close to +proj=tmerc +lat_0=0 +lon_0=27 +k=1.00 +x_0=350 +y_0=0 +ellps=intl +towgs84=-90.7,-106.1,-119.2,4.09,0.218,-1.05,1.37 +units=m +no_defs If it is not, update the record. A related thing is that Mapserver epsg text file often comes without towgs84 parameters for the Finnish KKJ zones. This is what I seem to have on this computer: KKJ / Finland Uniform Coordinate System 2393 +proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=350 +y_0=0 +ellps=intl +towgs84=-96.0617,-82.4278,-121.743,4.80107,0.34543,-1.37646,1.4964 +units=m +no_defs You can see that the parameters are not the same. There are more parameter sets around and that's actually the reason why Proj4 comes or at least used to come without any parameters because none of the sets was authorized. The results of these transformations are rather close and accurate to about one meter. You can read also http://latuviitta.org/documents/YKJ-TM35FIN_muunnos_ogr2ogr_cs2cs.txt (in Finnish, I suppose it is not a problem for you). -Jukka Rahkonen- Pena Kupen wrote: Hello all, Last time I was successfully helped by Ralf - Thank's once more time! http://postgis.refractions.net/pipermail/postgis-users/2011-March/029055.html Now I have same type of problem, but I cannot get correct result. Table is: CREATE TABLE location ( location_id integer NOT NULL, coord geometry ); Data is in coord column as 2393 format. My sql is like: select y(location.coord) as y_ykj, x(location.coord) as x_ykj, y(ST_Transform(location.coord,4326)) as y_wgs84, x(ST_Transform(location.coord,4326)) as x_wgs84 from location where location_id = 'AAA123A' result for y_ykj and x_ykj are ok, but point of x_wgs84 and y_wgs84 are about 180meters too much in east. -Pena -- Wippies-vallankumous on t��ll�! Varmista paikkasi vallankumouksen eturintamassa ja liity Wippiesiin heti! http://www.wippies.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Message: 2 Date: Mon, 25 Jul 2011 00:14:20 -0400 From: Mihaela Caluian mihaela.calu...@gmail.com Subject: [mapserver-users] Question: loadWeb(): Unknown identifier. Parsing error near (ms_tmp):(line 36) To: mapserver-users@lists.osgeo.org Message-ID: CAFJRrfRVVA98mPiczXk1-A_oqv_J8Ztmk=1c3enwa4iribn...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 Hello everybody, I am very new to MapServer and I have a lots of problem that I cannot find answer. Currently I am having trouble to figure out what is wrong with my .map files. I am getting this error when I try to click the button to load the map file: loadWeb(): Unknown identifier. Parsing error near (ms_tmp):(line 49) msOutputFormatValidate(): General error message. OUTPUTFORMAT png has IMAGEMODE RGB/RGBA, which is not supported for GD drivers. When I installed for the first time MapServer everything works, but I had to reinstall it and I cannot even see my work now. I am using Windows Vista and MapServer MS4W - MapServer 4 Windows - version 3.0.3: (This is my first
Re: [mapserver-users] Heatmap / choropleth from points
Hi Daniel, So if I undestand correctly you want to display you points and the colour the areas around them according to the nearest point (1), or if possible make a continous interpolated map that shows the gradients (2)? OK, this is not in the MapServer-topic, because MapServer has no way to do this. So I suggest we move this conversation private, but I'll try to give you an answer for future reference. If you have any questions, mail me directly. If this is indeed as you say non-dynamic, things are easy; with any respectable GIS package, you can create option (1) by making a Voronoi diagram. This makes polygons around yout points in which every location in its interior of the polygon is closer to its center point than it is to other points. The result is a vector image (shapefile). To create option (2) you have to interpolate these points into a (continuous) raster through any interpolation method. Simplest is nearest neighbour which in essence creates a Voronoi Diagram in raster format. If you want to go more pro, there is Inverse Distance Weighted (which I do not encourage people using because the options have huge influence on the outcome and are note really exact). Then there is Kriging, but you need to be into statistics quite a bit to be able to get a good outcome -- if not, leave it alone. Then there is also Natural Neighbour interpolation, which uses a Voronoi Diagram as its basis, and is thus quite well suited for using points that are anisotropically distributed, and when kriging is not an option. If you do want these things programatically, there are a couple of python scripts I have that you could use for create Nearest Neighbour and Natural Neighbour interpolations. You will need to adjust those quite a bit. Tom --- Date: Wed, 23 Feb 2011 04:56:43 -0800 (PST) From: Josh Jordan Subject: Re: [mapserver-users] Heatmap / choropleth from points attributes To: Daniel Cole Cc: mapserver-users@lists.osgeo.org [3] Message-ID: Content-Type: text/plain; charset=iso-8859-1 First, you have to turn your points into shapes, theres some algorithm that will turn points into polygons with borders midway between each point. CLASS If your CSV data isnt joined to the mapserver data, you have to calculate what shapes are in each bucket like this- CLASS --- On Tue, 2/22/11, Daniel Cole wrote: From: Daniel Cole Subject: [mapserver-users] Heatmap / choropleth from points attributes To: mapserver-users@lists.osgeo.org [7] Date: Tuesday, February 22, 2011, 10:06 PM I am a new mapserver user and have spent countless hours over the last month reading, trying code, etc. before posting here for help. I found some python code that I thought might do the trick , but it seems lots of heat maps are based off of how many points exist in a certain area, and thats now what I am doing. My points contain numbers in the attributes, 5, 25, 92, 71, etc. Thanks, Daniel -Inline Attachment Follows- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org [8] http://lists.osgeo.org/mailman/listinfo/mapserver-users -- next part -- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110223/fe139556/attachment-0001.html -- Links: -- [1] mailto:outerspacema...@yahoo.com [2] mailto:dan...@southernsolutionsms.com [3] mailto:mapserver-users@lists.osgeo.org [4] mailto:428818.75172...@web111314.mail.gq1.yahoo.com [5] mailto:dan...@southernsolutionsms.com [6] mailto:dan...@southernsolutionsms.com [7] mailto:mapserver-users@lists.osgeo.org [8] mailto:mapserver-users@lists.osgeo.org ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] RE: polygon tool
Hi Bob, You could also try using Fusion, it also has a polygon tool in there, but again its based on Open Layers. I gues you can make your own, but you'd need some sort of framework that converts the drawn polygon to the location, projection and units that your basemap is in, for which openLayers is the perfect framework I think. Tom van der Putte From: mapserver-users-boun...@lists.osgeo.org [1] [mapserver-users-boun...@lists.osgeo.org [2]] On Behalf Of Bistrais, Bob Sent: Thursday, February 17, 2011 8:18 AM To: mapserver-users Subject: [mapserver-users] polygon tool I am trying to create a polygon tool with PHP MapScript and JavaScript. I used to select map features. This kind of thing probably has been done before. Can anyone direct me to some code samples? Links: -- [1] mailto:mapserver-users-boun...@lists.osgeo.org [2] mailto:mapserver-users-boun...@lists.osgeo.org ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: GetFeatureInfo request in UTF8-environment
Hi, I had a similar issue, and the solution I used works but is labour intensive. I'm working mobile right now so I can't send you the link, but the solution is on the Esri forum somewhere. It concerns setting a registry key to a certain value. After this, restart ArcGIS (assuming you have this) add the shapefile, and then export it by rightclicking it in the table of contents- export data. Save it as a different file, and the attribute data will be in UTF8. I'll see if I have the link somewhere tonight. Cheers, Tom mapserver-users-request@lists.osgeo.orgschreef: 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. size of legend icon for pixmap-type classes (NASUNO Isao) 2. GetfeatureInfo-Request in an UTF-8 environment with shapfile in cp-1252 (Siegel Andreas) 3. Re: GetfeatureInfo-Request in an UTF-8 environment with shapfile in cp-1252 (Jeff McKenna) 4. RE: size of legend icon for pixmap-type classes (Lime, Steve D (DNR)) -- Message: 1 Date: Tue, 08 Feb 2011 17:42:23 +0900 From: NASUNO Isao isao.nas...@ctc-g.co.jp Subject: [mapserver-users] size of legend icon for pixmap-type classes To: mapserver-users@lists.osgeo.org Message-ID: 4d5101ef.9000...@ctc-g.co.jp Content-Type: text/plain; charset=ISO-2022-JP Hello all, I'm trying to make mapfile which includes polygon layer with pixmap-type symbol classes. The symbols are defined like ... - SYMBOL NAME symbol1 TYPE pixmap image /somewhere/symbol1.gif transparent 1 END - The polygon layer with pixmap is drawn perfectly by map mode, however in legend mode (mode=legend), the icons drawn like line layer. How do I say... it seems that mapserver draws icon for line ( /\/ ) like ArcMap's line layer using brush of the gif image. I defined the layer certainly as type polygon. - layer name jimon connectiontype postgis connection user=db password=xxx dbname=DB host=localhost port=5432 data the_geom from polygon status on type polygon classitem id projection init=epsg:4326 end class name pattern1 expression 1 style symbol symbol1 end end end - What I want is normal rectangle-shaped icons filled up with the gif. Could anyone help me ? Thanks, Isao NASUNO -- Message: 2 Date: Tue, 8 Feb 2011 15:37:35 +0100 From: Siegel Andreas andreas.sie...@vorarlberg.at Subject: [mapserver-users] GetfeatureInfo-Request in an UTF-8 environment with shapfile in cp-1252 To: mapserver-users@lists.osgeo.org Message-ID: 5fbe485f93722e4589047fab5195b63c051b0...@avlrbrcl08a.net.vlr.gv.at Content-Type: text/plain; charset=iso-8859-1 Hi. Our mapserver-eniromnent entirely works in utf-8 (mapfiles, webserver, postgres, ..) with one exception, that is, all of our shapefiles. The shapfiles are created/updated in an Windows-environment by several, external contributors. Hence they are encoded in Wiindows-ANSI (cp: 1252). If i do an GetFeatureInfo-Request on the attibutes of the shapefiles all special characters (umlauts) are garbled. This is no wonder since the content of the shapefile-attributes must be recoded to utf-8 prior to insertion in the template.html. How can this be acomplished? I could not find anything useful in the documentation or with google. Mag Andreas Siegel Landesvermessungsamt Feldkirch Johannitergasse 6, A-6800 Feldkirch Tel: +43(0) 5522 / 75482 - 60227 Fax: +43(0) 5522 / 75482 - 6 E-Mail: andreas.sie...@vorarlberg.at mailto:andreas.andreas.sandreas.sie...@vorarlberg.at http://www.vorarlberg.at/lva Rechtsverbindlichen Schriftverkehr (zB Antr�ge, Rechtsmittel) richten Sie an: E-Mail: landesvermessungs...@vorarlberg.at Fax: +43(0)5522/75482-6 -- next part -- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110208/b94ad66d/attachment-0001.html -- Message: 3 Date: Tue, 08 Feb 2011 10:48:49 -0400 From: Jeff McKenna jmcke...@gatewaygeomatics.com Subject: Re: [mapserver-users] GetfeatureInfo-Request in an UTF-8 environment with shapfile in cp-1252 To: mapserver-users@lists.osgeo.org Message-ID: 4d5157d1.3050...@gatewaygeomatics.com Content-Type: text/plain; charset=UTF-8; format=flowed Hello, A quick thought that I
RE: [mapserver-users] GetfeatureInfo-Request in an UTF-8 environment with shapfile in cp-1252
Hi Andreas, i looked it up, you can find it here: http://resources.arcgis.com/content/kbase?fa=articleShowd=21106 Unfortunately I'm not aware of any means to automate the process of exporting the shapefiles, so you'd have to do it by hand. Tom ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Creating and editing UTF8 shape files
Hi Ian, It is also possible to save shapefiles in UTF8 in ArcMap by changing a registry entry (a little user-unfriendly, but it works). See http://resources.arcgis.com/content/kbase?fa=articleShowd=21106 [1] . Tom van der Putte Links: -- [1] http://resources.arcgis.com/content/kbase?fa=articleShowamp;d=21106 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: mapserver-users Digest, Vol 34, Issue 73
Hi Daniel, I'm not sure if mapserver can do this for you; how I did it was to create two different shapes, and use the minscaledenom and maxscaledenom to display one of the two in different scale levels. Cheers, Tom On Sun 28/11/10 18:00 , mapserver-users-requ...@lists.osgeo.org sent: Send mapserver-users mailing list submissions to mapserver-users@lists.osgeo.org [1] 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 [2] You can reach the person managing the list at mapserver-users-ow...@lists.osgeo.org [3] When replying, please edit your Subject line so it is more specific than Re: Contents of mapserver-users digest... Today's Topics: 1. wfs different level of detail (Daniel Carvalho) -- Message: 1 Date: Sun, 28 Nov 2010 15:14:03 + From: Daniel Carvalho Subject: [mapserver-users] wfs different level of detail To: mapserver-users@lists.osgeo.org [5] Message-ID: Content-Type: text/plain; charset=iso-8859-1 hi When I'm using WFS with OpenLayers, is it possible to make mapserver produce different detail level (simplifying geometries) according to the zoom level I'm using? That would be convenient to display maps with a lot of detail.. Or I should define different layers, with different details, and activate one of then according to the zoom level? thks! -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 554 bytes Desc: OpenPGP digital signature Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20101128/13c6ca70/signature-0001.bin -- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org [7] http://lists.osgeo.org/mailman/listinfo/mapserver-users End of mapserver-users Digest, Vol 34, Issue 73 *** Links: -- [1] mailto:mapserver-users@lists.osgeo.org [2] mailto:mapserver-users-requ...@lists.osgeo.org [3] mailto:mapserver-users-ow...@lists.osgeo.org [4] mailto:idn...@gmail.com [5] mailto:mapserver-users@lists.osgeo.org [6] mailto:4cf271bb.1080...@gmail.com [7] mailto:mapserver-users@lists.osgeo.org ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: Re: [mapserver-users] Mapscript Rasterquery returns empty result
Hi Frank, Alexander, Again thanks for your reply; I've been abroad for a month and haven't had time to check it out. However, I've ben doing some work on it today, and tested the following: I made a test tiff, with 2 large areas surrounded by NoData. When clicking anywhere in any one of the 2 big areas I get the response: {_handle_:Resource id #47,numlines:1,type:0,index:-1,tileindex:-1,classindex:0,numvalues:8,text:,bounds:{_handle_:Resource id #48,minx:401265.0032,miny:633815.31,maxx:401265.0032,maxy:633815.31},values:[null,null,null,null,null,null,null,null]} When I click on any nodata area the response is Warning: [MapServer Error]: msQueryByPoint(): No matching record(s) found. in C:ms4wappsfusionMapServerphpGetRasterPoint.php on line 36 Fatal error: [MapServer Error]: msRASTERLayerGetShape(): Out of range shape index requested. Requested 0 but only 0 shapes available. in C:ms4wappsfusionMapServerphpGetRasterPoint.php on line 42 This behaviour follows the edges of the areas perfectly. Also I checked it out with fixed coord pairs, and it doesn't seem te related to CRS problems. I've also tried IMG instead of TIFF, but no difference there. As mentioned, I'm running mapscript 5.2.1, not 5.6. I'm don't know if this would make a difference, but perhaps someone could test this for me? The TIFF I use for testing is available from: BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }http://www.vdputte.nl/test_tiff.rar *** For the MAP part of the mapfile, I use the following (I removed most non-essential things): EXTENT -100 -120 2902206 1773859 IMAGETYPE PNG24 SIZE 600 600 STATUS ON UNITS METERS NAME Test_Map PROJECTION 'proj=lcc' 'lat_1=52.670002' 'lat_2=54.33' 'lat_0=48' 'lon_0=10' 'x_0=815000' 'y_0=0' 'ellps=intl' 'units=m' 'no_defs' END *** For the test LAYER: LAYER NAME mask DATA c:/ms4w/Apache/htdocs/data/rasters/depthmaps/tert_msk_rast.img TYPE RASTER STATUS ON LAYER TEMPLATE dummy.html CLASS NAME 1 EXPRESSION ([pixel] == 1) STYLE color 255 0 0 END END CLASS NAME 2 EXPRESSION ([pixel] == 2) STYLE color 0 255 0 END END END#layer *** For the querying script I use this: $szLayer = mask; $oLayer = $oMap-getLayerByName($szLayer); //get Layer $oMap-prepareQuery(); // To be sure no CRS problems arise, I use these coords, smack in the middle of the left area $x = 360429; $y = 642536; /* //For NoData, use $x = 759753; $y = 935658; // for a point right between the 2 areas */ $oPoint = ms_newPointObj(); //Create Point $oPoint-setXY($x,$y); $status = $oLayer-queryByPoint($oPoint, MS_MULTIPLE, 1); //Query $status = $oLayer-open(); $result = $oLayer-getResult(0); //Get Result $numResults = $oLayer-getNumResults(); $shape = $oLayer-getShape($result-shapeindex,$result-tileindex); // Retrieve shape echo(var2json($shape)); //echo to browser Can anybody confirm that they get the same behaviour? Cheers, Tom On Thu 29/04/10 16:07 , Frank Warmerdam warmer...@pobox.com sent: Tom van der Putte wrote: Hi, I have the following code: $oMap-prepareQuery(); $oPoint = ms_newPointObj(); $oPoint-setXY($x,$y); //coords received from a AJAX call $oLayer = $oMap-GetLayerByName($szLayer); //Name received from a AJAX call $status = $oLayer-queryByPoint($oPoint, MS_MULTIPLE, 1); $status = $oLayer-open(); $result = $oLayer-getResult(0); $numResults = $oLayer-getNumResults(); $shape = $oLayer-getShape($result-shapeindex,$result-tileindex); echo(var2json($shape)); This results in the follwing json code to be returned: |{_handle_:Resource id #45,numlines:1,type:0,index:-1, tileindex:-1,classindex:0,numvalues:8,text:, bounds:{_handle_:Resource id #46,minx:607000, miny:677000,maxx:607000,maxy:677000}, values:[null,null,null,null,null,null,null,null]}| No matter what I try, it keeps returning empty shapes. How can this be? Tom, I agree with Alexander that you should be carefully reviewing your input coordinate and insuring it is in the same coordinate system as the raster file. The returned values are expected if you are attempting to fetch a non-existant result shape. If you simplify your test case down as much as you can and you still can't figure out why you do not get a result then you could try to bundle this up and submit it as a ticket. Keep in mind that such a ticket is much more likely to be acted on if you make it *easy* for the developer to reproduce your problem. Best regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, light and sound - activate
Re: Re: Re: [mapserver-users] Mapscript Rasterquery returns empty result
Hi Jukka, Hmmm that does look strange, but as it turns out, removing LAYER didn't help. Thx anyway ;) Tom On Wed 02/06/10 13:23 , Rahkonen Jukka jukka.rahko...@mmmtike.fi sent: BODY { FONT-SIZE: 12px; FONT-FAMILY: Arial, Helvetica, sans-serif } Hi, LAYER TEMPLATE dummy.html? Does such a thing exist? Have you tried with plain TEMPLATE dummy.html? -Jukka Rahkonen- - Lähettäjä:mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Tom van der Putte Lähetetty: 2. kesäkuuta 2010 13:34 Vastaanottaja:Frank Warmerdam; Alexander Petkov Kopio:mapserver-users@lists.osgeo.org Aihe: Re: Re: [mapserver-users]Mapscript Rasterquery returns empty result Hi Frank, Alexander, Again thanks for your reply; I've beenabroad for a month and haven't had time to check it out. However, I've bendoing some work on it today, and tested the following: I made a testtiff, with 2 large areas surrounded by NoData. When clicking anywhere in anyone of the 2 big areas I get the response: {_handle_:Resource id #47,numlines:1,type:0,index:-1,tileindex:-1,classindex:0,numvalues:8,text:,bounds:{_handle_:Resource id #48,minx:401265.0032,miny:633815.31,maxx:401265.0032,maxy:633815.31},values:[null,null,null,null,null,null,null,null]} WhenI click on any nodata area the response is Warning: [MapServer Error]: msQueryByPoint(): No matching record(s) found. in C:ms4wappsfusionMapServerphpGetRasterPoint.php on line 36 Fatal error: [MapServer Error]: msRASTERLayerGetShape(): Out of range shape index requested. Requested 0 but only 0 shapes available. in C:ms4wappsfusionMapServerphpGetRasterPoint.php on line 42 This behaviour follows the edges of the areas perfectly. Also I checked it out with fixed coord pairs, and it doesn't seem te related to CRS problems. I've also tried IMG instead of TIFF, but no difference there. As mentioned, I'm running mapscript 5.2.1, not 5.6. I'm don't know if this would make a difference, but perhaps someone could test this for me? The TIFF I use for testing is available from: BODY { FONT-SIZE: 12px; FONT-FAMILY: Arial, Helvetica, sans-serif } http://www.vdputte.nl/test_tiff.rar*** For the MAP part of the mapfile,I use the following (I removed most non-essential things): EXTENT -100 -120 29022061773859 IMAGETYPE PNG24 SIZE 600600 STATUS ON UNITSMETERS NAME Test_Map PROJECTION 'proj=lcc' 'lat_1=52.670002' 'lat_2=54.33' 'lat_0=48' 'lon_0=10' 'x_0=815000' 'y_0=0' 'ellps=intl' 'units=m' 'no_defs' END *** For the testLAYER: LAYER NAMEmask DATA c:/ms4w/Apache/htdocs/data/rasters/depthmaps/tert_msk_rast.img TYPE RASTER STATUS ON LAYER TEMPLATE dummy.html CLASS NAME1 EXPRESSION ([pixel] ==1) STYLE color 255 0 0 END END CLASS NAME2 EXPRESSION ([pixel] ==2) STYLE color 0 255 0 END END END#layer *** For the querying script I use this: $szLayer =mask; $oLayer = $oMap-getLayerByName($szLayer); //getLayer $oMap-prepareQuery(); // To be sure no CRS problems arise,I use these coords, smack in the middle of the left area $x = 360429; $y= 642536; /* //For NoData, use $x = 759753; $y = 935658; // for a point rightbetween the 2 areas */ $oPoint = ms_newPointObj();//Create Point $oPoint-setXY($x,$y); $status =$oLayer-queryByPoint($oPoint, MS_MULTIPLE, 1); //Query $status =$oLayer-open(); $result = $oLayer-getResult(0); //GetResult $numResults = $oLayer-getNumResults(); $shape = $oLayer-getShape($result-shapeindex,$result-tileindex); // Retrieve shape echo(var2json($shape)); //echo to browser Cananybody confirm that they get the samebehaviour? Cheers, Tom On Thu 29/04/10 16:07 , Frank Warmerdamwarmer...@pobox.com sent: Tom van der Putte wrote: Hi, I have the following code: $oMap-prepareQuery(); $oPoint = ms_newPointObj(); $oPoint-setXY($x,$y); //coords received from a AJAX call $oLayer = $oMap-GetLayerByName($szLayer); //Name received from a AJAX call $status = $oLayer-queryByPoint($oPoint, MS_MULTIPLE, 1); $status = $oLayer-open(); $result = $oLayer-getResult(0); $numResults = $oLayer-getNumResults(); $shape = $oLayer-getShape($result-shapeindex,$result-tileindex); echo(var2json($shape)); This results in the follwing json code to be returned: |{_handle_:Resource id #45,numlines:1,type:0,index:-1, tileindex:-1,classindex:0
RE: [mapserver-users] Mapscript Rasterquery returns empty result
Hi Frank, Alexander, Thx for the replies. I'll give it a try as soon as possible. I do have a good hunch however that it won't come down to the coordinates, because when I try his on a tiff, this is the error it gives when clicking on a section of the tiff that has any value except noData; when I click on an empty section (NoData) it gives a different error. Some testing with this showed that it does send and uses the correct coords. I think it might have something to do with the tiffs themselves. I'll follow your advise an create a testcase as simple as possible. Note that I'm using 5.2.1 and can't easily upgrade to 5.6, so a ticket might not be appropriate? Cheers, Tom ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Mapscript Rasterquery returns empty result
Hi, I have the following code: $oMap-prepareQuery(); $oPoint = ms_newPointObj(); $oPoint-setXY($x,$y); //coords received from a AJAX call $oLayer = $oMap-GetLayerByName($szLayer); //Name received from a AJAX call $status = $oLayer-queryByPoint($oPoint, MS_MULTIPLE, 1); $status = $oLayer-open(); $result = $oLayer-getResult(0); $numResults = $oLayer-getNumResults(); $shape = $oLayer-getShape($result-shapeindex,$result-tileindex); echo(var2json($shape)); This results in the follwing json code to be returned: {_handle_:Resource id #45,numlines:1,type:0,index:-1, tileindex:-1,classindex:0,numvalues:8,text:, bounds:{_handle_:Resource id #46,minx:607000, miny:677000,maxx:607000,maxy:677000}, values:[null,null,null,null,null,null,null,null]} No matter what I try, it keeps returning empty shapes. How can this be? P.S. I'm using mapserver 5.2.1 from the ms4w package. Cheers, Tom ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users