Re: [mapserver-users] Problem GetFeature with geom filter on WFS
Hello, Effectively without any limits it's working. Sincerely Stéphane Brunner 2011/8/18 Rahkonen Jukka jukka.rahko...@mmmtike.fi: Hi, I agree that if Mapserver is doing the final filtering then passing maxFeatures=100 value for the query selecting the candidates is not right. But have you tested what happens if you run your WFS query without maxFeatures? It would be good to know if the result set is OK then. -Jukka Rahkonen- Stéphane Brunner wrote: Hello Steve, Sorry for the delay. I as on holiday last couple of weeks but the issue is still a blocker for us. Your say « PostGIS should be returning an appropriate set of candidate features » but with our request PostGIS returns only the 100 first features (a subset of all features) without taking any geographical aspect into account. MapServer filters them correctly but as we get only the 100 first results from the DB, we miss many objects and/or they are not related to the area where we want to apply a geographical filter. We've done a test on how MapServer handles the 100 first results and it's working. We also tested the behavior with a SHP file and it works like a charm, there is no limitation. For our understanding, there is an issue in the way mapserver pass the query to PostGIS as there is an inappropriate LIMIT value in the SQL statement and mapserver doesn't seem to pass a BBOX in order to prefilter the set in the DB. Best regards Stéphane Brunner 2011/7/30 Steve Lime sdl...@gmail.com: The filter encoding code only translates certain things into native SQL, the rest is handled in a uniform way within MapServer. Hopefully this will change over time and more processing will be moved to the database but there hasn't been time to do that yet, maybe for 6.2. PostGIS should be returning an appropriate set of candidate features for MapServer to perform additional filtering. Shapefiles work the same way. If you look at the SQL executed by Postgres you should see all of the matching features plus a few more. Steve Sent from my iPad On Jul 28, 2011, at 9:18 AM, Stéphane Brunner stephane.brun...@camptocamp.com wrote: Hello, I log the sql request on spatial filter and I have this: select oid,nummer,gemeinde,gueltigkeit,flgrundb,quote,ei gentuemer,adresse_lang,encode(ST_AsBinary(ST_Force_2D(geom ),'NDR'),'hex') as geom,oid from (SELECT oid, t1.geom, t1.nummer, t2.gemeinde, t1.gueltigkeit1_txt as gueltigkeit, t2.flgrundb, ((t2.zaehler::text || '/'::text) || t2.nenner::text) AS quote, t2.eigentuemer, (((t2.adresse::text || ', '::text) || t2.plz::text) || ' '::text) || t2.ort::text AS adresse_lang FROM av.liegenschaften_liegenschaft_area as t1, av.view_gemlis_geomaste_parzelle as t2 WHERE t1.gdid = t2.gdeid and t1.nummer = t2.parznr::text) AS foo where geom GeomFromText('POLYGON((62 218000,62 278000,69 278000,69 218000,62 218000))',-1) limit 100 I didn't see any postggis filter than I try to do a spatial filter on one of the 100 first results Than I have a correct result ... Than why mapserver doesn't use postgis spatial filter ? Does I miss something ? Thank-you in advance Stéphane Brunner 2011/7/26 Stéphane Brunner stephane.brun...@camptocamp.com: Hello, I just test it with a shape file, and it's working... I will investigate a little bit more to know why it's not working with postgres. Sincerely Stéphane Brunner 2011/7/25 Steve Lime sdl...@gmail.com: Never mind on version, I saw 6.0.0 in the response... ;-) Steve On Mon, Jul 25, 2011 at 6:19 AM, Stéphane Brunner stephane.brun...@camptocamp.com wrote: Hello, I have the mapfile [0]. when I done a GetFeature on the nummer [1] I have 4 results [2] (with duplicate but it's an other issue). When I done a spatial filter [3] I have no results [4] but I should have at least one result ... Thanks in advance for having a look on this issue. Sincerely yours Stéphane Brunner Following: specified, GetCapabilities [5], describefeaturetype [6]. mapfile [0]: MAP NAME map EXTENT 62 218000 69 278000 UNITS METERS IMAGETYPE jpeg RESOLUTION 72 DEFRESOLUTION 72 IMAGECOLOR 255 255 255 STATUS ON FONTSET fonts.conf SYMBOLSET symbole.sym MAXSIZE 5000 PROJECTION init=epsg:21781 END # Used by overlays OUTPUTFORMAT NAME png256 DRIVER AGG/PNG MIMETYPE image/png256 IMAGEMODE RGBA EXTENSION png FORMATOPTION INTERLACE=OFF FORMATOPTION QUANTIZE_FORCE=ON FORMATOPTION QUANTIZE_DITHER=OFF FORMATOPTION QUANTIZE_COLORS=256 END OUTPUTFORMAT NAME png DRIVER AGG/PNG MIMETYPE image/png IMAGEMODE RGBA EXTENSION png FORMATOPTION INTERLACE=OFF FORMATOPTION
RE: [mapserver-users] Map size question?
Hi David That was very good advice. Thanks! Regards, Chris From: Fawcett, David (MPCA) [mailto:david.fawc...@state.mn.us] Sent: 18 August 2011 18:38 To: Chris Green; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Map size question? Chris, If you are in tile mode, I assume that you probably don't want an embedded legend on each tile. Have you thought about doing a separate call/request/object for the legend? If you were doing this via CGI, I would recommend doing a separate mode=legend request. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Chris Green Sent: Thursday, August 18, 2011 12:04 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Map size question? After quite a while thinking I could not produce a legend I have realised that the legend is actually there, just off the edge of my map. Now I see that although my map file specifies a map size of 640 x 480 pixels, if in single tile mode the map image being produced is actually 1110 x 660 pixels. Alternatively with multiple tiles I get 12 tiles of 250 x 250 pixels which is 1024 x 768 pixels. It seems that the size parameter in the map file is being ignored (even setting the values to 0 0 or omitting the SIZE parameter altogether makes no difference). MAXSIZE doesn't seem to help either. I can't find a way to get the image size that I want, can anyone help? Chris From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Chris Green Sent: 18 August 2011 08:02 To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] mapsript legend Hi all I have a map created via Mapscript under Mapserver 6.0 but I can't find a way to add a legend. Recent examples are hard to find but I found the following dating from 2002 which seemed simple enough: $legend = $map-legend; $legend-set(width,40); $legend-set(height,100); $legend-imagecolor-setRGB(240,220,200); # tan $legend-outlinecolor-setRGB(1,1,1); # black $legend-set(status, MS_EMBED); $legend-set(position, MS_UL); // SET LEGEND LABEL PROPERTIES $lg_label = $legend-label; $lg_label-set(font, arial); $lg_label-set(type, MS_TRUETYPE); $lg_label-set(size, 10); $lg_label-set(minsize, 6); $lg_label-set(maxsize, 12); $lg_label-color-setRGB(100,100,100); $legend-set(postlabelcache, MS_TRUE); // DRAW LEGEND $legendImage=$map-drawLegend(); Unfortunately this produces no output. Can anyone give me any clues why? Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: Raster Data from PostGIS
Buenos días Gustavo, Al final no pude encontrar como hacer esto, la única herramienta que estuve probando fue el GDAL (te genera una capa de rasters variables). Terminé almacenando los rasters en un directorio (en lugar de la Geodatabase) y levantandolos desde ahí. Disculpame que no te pude contestar antes. Saludos y a las órdenes por cualquier otra consulta, Florencia de Uruguay. 2011/8/19 Gustavo1376 [via OSGeo.org] ml-node+6701922-1641837362-295...@n2.nabble.com Hi Florencia, i am Gustavo from Uruguay. Have you finally found the way to load a raster from a PostGis database? I'm trying to do that but no had no success yet. In my case the problem is that my application would generate a new raster everyday, so if i save them to disk it quickly will get out of space. So my option is to store the rasters in the database, with it's dedicated storage and (i hope) special methods for optimizing it's storage capacity. I mean, i think that a PostGis with 500GB storage capacity should be able to store much more images than a flat file system with same capacity. Well, i'll be pleased if you could share your solution (if finally found any). Regards, Gustavo. -- If you reply to this email, your message will be added to the discussion below: http://osgeo-org.1803224.n2.nabble.com/Raster-Data-from-PostGIS-tp5784362p6701922.html To unsubscribe from Raster Data from PostGIS, click herehttp://osgeo-org.1803224.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5784362code=Zmxvcml0YTAyNkBnbWFpbC5jb218NTc4NDM2MnwtMTA5MjA5NTEwMA==. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Raster-Data-from-PostGIS-tp5784362p6711536.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: Raster Data from PostGIS
Thanks Jukka, i'll consider this. In fact, it is issier for me to store the images in a directory. Is only that i thought that a kind of specialized engine such as a DataBase would be smarter in the way it stores things such as images. But that was only a hypothesis. Anyway, i'll investigate a bit more. If a found something interesting about this issue i'll post it. Regards, Gustavo. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Raster-Data-from-PostGIS-tp5784362p6712161.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] Problem using FILTER when the value begins with i
I have a strange behavior when using a FILTER where the values begin with 'i, I have to double my i to make it work! Example: This doesn't work FILTER code= 'Inactive' In the mapserver.log I can see that i disappear, I get in the query ... (code = 'nactive'), so no data are returns Using double I it works FILTER code= 'IInactive' It seems that using 'I' or i mean something...and that changes the encoding of the string or something. I'm using mapserver 6.0.1 on a windows 2008 64bits server. The data are in a postgis table. This mapfile was working well with mapserver 5.6 on windows 2003 32bits server. Anyone have seen this before? thanks for your help, Steve ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE [mapserver-users] Problem using FILTER when the value begins with i
UPDATE... escaping i works FILTER code= '\Inactive' If someone can explain I would appreciate. thanks Steve steve.tout...@inspq.qc.ca@lists.osgeo.org Envoyé par : mapserver-users-boun...@lists.osgeo.org 2011-08-22 13:47 A mapserver-users@lists.osgeo.org cc Objet [mapserver-users] Problem using FILTER when the value begins with i I have a strange behavior when using a FILTER where the values begin with 'i, I have to double my i to make it work! Example: This doesn't work FILTER code= 'Inactive' In the mapserver.log I can see that i disappear, I get in the query ... (code = 'nactive'), so no data are returns Using double I it works FILTER code= 'IInactive' It seems that using 'I' or i mean something...and that changes the encoding of the string or something. I'm using mapserver 6.0.1 on a windows 2008 64bits server. The data are in a postgis table. This mapfile was working well with mapserver 5.6 on windows 2003 32bits server. Anyone have seen this before? thanks for your help, Steve ___ 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] Problem displaying a NAD83 tile in WGS84 (or via WMS)
Thanks, that solved my problem - the map projects perfectly now. I feel foolish. From: Smith, Michael ERDC-CRREL-NH [michael.sm...@usace.army.mil] Sent: Saturday, August 20, 2011 2:25 AM To: Ed Resnick; mapserver-users@lists.osgeo.org Subject: Ext Re: [mapserver-users] Problem displaying a NAD83 tile in WGS84 (or via WMS) Ed, Your mrsid image is in UTM Zone 10, NAD 1983. You should set PROJECTION init=epsg:26910 END For your layer (http://spatialreference.org/ref/epsg/26910/) -- Mike Michael Smith Remote Sensing/GIS Center US Army Corps of Engineers On 8/19/11 5:23 PM, Ed Resnick eresn...@tapestrysolutions.com wrote: Here's a WMS request, broken up for readability: --- http://10.10.10.206/cgi-bin/mapserv.exe?map=E:/osm4326/mrsid.map service=WMS version=1.1.1 request=GetMap layers=default format=image/png width=256 height=256 srs=EPSG:4326 bbox=-122.875,45.25,-122.75,45.375 transparent=TRUE --- Here's the gdalinfo dump: --- Driver: MrSID/Multi-resolution Seamless Image Database (MrSID) Files: wa.sid.sid wa.sid.sdw wa.sid.sid.aux.xml Size is 1742, 1458 Coordinate System is: PROJCS[NAD_1983_UTM_Zone_10N, GEOGCS[GCS_North_American_1983, DATUM[North_American_Datum_1983, SPHEROID[GRS_1980,6378137.0,298.257222101]], PRIMEM[Greenwich,0.0], UNIT[Degree,0.0174532925199433]], PROJECTION[Transverse_Mercator], PARAMETER[false_easting,50.0], PARAMETER[false_northing,0.0], PARAMETER[central_meridian,-123.0], PARAMETER[scale_factor,0.9996], PARAMETER[latitude_of_origin,0.0], UNIT[Meter,1.0]] Origin = (555230.000,5048039.000) Pixel Size = (1.09239300614,-1.000) Metadata: IMAGE__INPUT_NAME=C:\DOCUME~1\PAULW~2.ATT\LOCALS~1\Temp\img1AE.tmp IMAGE__INPUT_FILE_SIZE=7619508.00 GEO__spref_horizsys_cordsysn_geogcsn=GCS_North_American_1983 GEO__spref_horizsys_cordsysn_projcsn=NAD_1983_UTM_Zone_10N GEO__spref_horizsys_planar_gridsys_gridsysn=Universal Transverse Mercator GEO__spref_horizsys_planar_gridsys_utm_utmzone=10 GEO__spref_horizsys_planar_gridsys_utm_transmer_sfctrmer=0.999600 GEO__spref_horizsys_planar_gridsys_utm_transmer_longcm=-123.00 GEO__spref_horizsys_planar_gridsys_utm_transmer_latprjo=0.00 GEO__spref_horizsys_planar_gridsys_utm_transmer_feast=50.00 GEO__spref_horizsys_planar_gridsys_utm_transmer_fnorth=0.00 GEO__spref_horizsys_planar_planci_plance=row and column GEO__spref_horizsys_planar_planci_plandu=meters GEO__spref_horizsys_planar_planci_coordrep_absres=1.09 GEO__spref_horizsys_planar_planci_coordrep_ordres=1.00 GEO__spref_horizsys_geodetic_horizdn=North American Datum of 1983 GEO__spref_horizsys_geodetic_ellips=Geodetic Reference System 80 GEO__spref_horizsys_geodetic_semiaxis=6378137.00 GEO__spref_horizsys_geodetic_denflat=298.257222 IMAGE__COMPRESSION_VERSION=1,6,3 IMAGE__TARGET_COMPRESSION_RATIO=20.00 IMAGE__COMPRESSION_NLEV=6 IMAGE__COMPRESSION_WEIGHT=4.00 IMAGE__COMPRESSION_GAMMA=2.00 IMAGE__COMPRESSION_BLOCK_SIZE=512 IMAGE__CREATION_DATE=Wed Dec 02 14:18:16 2009 IMAGE__NO_DITHER=0 VERSION=MG2 IMAGE__WIDTH=1742 IMAGE__HEIGHT=1458 IMAGE__NO_DATA_VALUE=15,172,40 IMAGE__TRANSPARENT_DATA_VALUE=0,0,176 IMAGE__COLOR_SCHEME=0 IMAGE__DATA_TYPE=0 IMAGE__XY_ORIGIN=555230.55,5048038.50 IMAGE__X_RESOLUTION=1.09 IMAGE__Y_RESOLUTION=1.00 Image Structure Metadata: INTERLEAVE=PIXEL Corner Coordinates: Upper Left ( 555230.000, 5048039.000) (122d17'31.28W, 45d35' 1.32N) Lower Left ( 555230.000, 5046581.000) (122d17'31.87W, 45d34'14.07N) Upper Right ( 556972.016, 5048039.000) (122d16'10.90W, 45d35' 0.81N) Lower Right ( 556972.016, 5046581.000) (122d16'11.51W, 45d34'13.57N) Center ( 556101.008, 5047310.000) (122d16'51.39W, 45d34'37.44N) Band 1 Block=1742x128 Type=Byte, ColorInterp=Red Minimum=60.000, Maximum=222.000, Mean=119.606, StdDev=36.132 Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23 Band 2 Block=1742x128 Type=Byte, ColorInterp=Green Minimum=84.000, Maximum=220.000, Mean=133.956, StdDev=21.319 Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23 Band 3 Block=1742x128 Type=Byte, ColorInterp=Blue Minimum=95.000, Maximum=205.000, Mean=119.015, StdDev=12.620 Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23 --- And finally here is the map file: --- MAP OUTPUTFORMAT NAME agg DRIVER AGG/PNG IMAGEMODE RGB FORMATOPTION INTERLACE=false MIMETYPE image/png END NAME MrSID IMAGETYPE agg MAXSIZE 4000 SIZE 800 800 IMAGECOLOR #B3C6D4 WEB METADATA
[mapserver-users] Extra ? in WCS query
Hi, I try to get data from mapserv WCS to Esri Arcmap. Esri only gives error message. I opened apache log and Esri makes query : /cgi-bin/mapserv.exe?map=c:\blaah\testi.map?SERVICE=WCS In browser Esri query above gives error as well Service parameter missing. By removing ? from above ... testi.map?SERVICE ... query seems to work in browser. Question. Is this ? problem of mapserv or Esri? Thanks! Tapio -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Extra-in-WCS-query-tp6714823p6714823.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] Extra ? in WCS query
On 11-08-22 10:17 PM, teri wrote: Hi, I try to get data from mapserv WCS to Esri Arcmap. Esri only gives error message. I opened apache log and Esri makes query : /cgi-bin/mapserv.exe?map=c:\blaah\testi.map?SERVICE=WCS In browser Esri query above gives error as well Service parameter missing. By removing ? from above ... testi.map?SERVICE ... query seems to work in browser. Question. Is this ? problem of mapserv or Esri? Tapio, I presume you are specifying .../cgi-bin/mapserv.exe?map=c:\blaah\testi.map as the service URL when setting things up with ArcMap? I believe ArcMap uses GDAL's WCS driver underneath for WCS server access and the GDAL WCS driver service definition file should include the ? in the service url. However, it is possible that ArcMap is adding an extra question mark to whatever you specify when it is defining the GDAL WCS ServiceURL. If so, the problem is with ArcMap, and you should file a ticket with them. In the meantime, you can wrap the WCS service so that the map does not need to be defined in the URL. On Linux I would normally accomplish this by putting a shell script in the cgi-bin directory that defines the MS_MAPFILE environment variable. I'm not so sure how to accomplish this on Windows, though you could likely add MS_MAPFILE's definition in your Apache configuration if it is unlikely to cause conflicts on any other service run from the same apache. Best regards, -- ---+-- 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 Programmer for Rent ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users