Re: [mapserver-users] Offset values from database
Would it not be possible to draw the polygon as 2 different polygons (the inner polygon the outer using the postgis functions)? You could specify a fixed offset for one or the other. On the other hand, if you just have 1 polygon (with a single line, so no inner polygons) and you're trying to accomplish a visual effect that the inside of the polygon lies further away, i would accomplish this by drawing a thicker border. Or you could possibly use the asymmetric line drawing functions that are available. Maybe give a more concrete example of what exactly you are trying to do. On 12 August 2010 22:46, Bob Basques bob.basq...@ci.stpaul.mn.us wrote: All, Wondering, would this work for INSIDE/OUTSIDE situations with regard to polygon drawing? Or is the left/right sides of the line strictly relying on the from/to aspects of how the polygon was drawn (clockwise/counterclockwise) This would be handy for off-setting to (ONLY) the inside of a polygon for example. Thanks bobb Wim Vanbelle wimvanbe...@gmail.com wrote: Thank you very much everyone. And especially Thomas. That was indeed what I was looking for. You saved me a lot of work! Much appreciated. On 12 August 2010 17:50, Fawcett, David (MPCA) david.fawc...@state.mn.us wrote: Thanks Thomas That looks nice in my test example. David. -Original Message- From: thomas bonfort [mailto:thomas.bonf...@gmail.com] Sent: Thursday, August 12, 2010 10:45 AM To: Fawcett, David (MPCA) Cc: Wim Vanbelle; mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Offset values from database the -99 is a special offset value that shifts the line as you are looking for. style color 255 0 0 offset -2 -99 width 2 end style color 0 255 0 offset 2 -99 width 2 end not perfect as there are artifacts on sharp angles, but worth a try. regards, thomas On Thu, Aug 12, 2010 at 16:56, Fawcett, David (MPCA) david.fawc...@state.mn.us wrote: Wim, You can do these offsets in pixel values at a class level, just not a feature level. This pretty much does what you are describing, although it gets a little funky when the lines are diagonal and not straight. CLASS STYLE COLOR 0 0 0 WIDTH 2 END STYLE COLOR 255 0 0 WIDTH 2 OFFSET 10 10 END STYLE COLOR 0 255 0 WIDTH 2 OFFSET -10 -10 END END David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Wim Vanbelle Sent: Thursday, August 12, 2010 9:32 AM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Offset values from database Maybe this pic helps elaborate on what i'm trying to accomplish: http://fileshare.myroute.be/exchange/asymmetriclinedrawing.png It should be noted that the distance between the 2 (new) lines, should be a fixed value over the zoomlevels. It must not be the case that at the furthest zoomlevel the lines are further apart. I've looked all over for this, but never really found a proper solution. I tried cartographic symbol drawing, but it only draws on the same side every time. Maybe I'm just doing it wrong :). On 12 August 2010 16:28, Wim Vanbelle wimvanbe...@gmail.com wrote: Hello, thanks for your feedback. The issue with this, is that the underlying linestrings (the 2 that would lie on top of eachother), have different colors :(. So they have to be moved apart from one another. I have not found a way to do this with asymmetric line drawing either, as it will always offset to the same side. This is why i would need the offset value to be configurable in the database. I could select a different pixel offset for each line and they would always appear next to eachtoher (no matter what zoomlevel). I can elaborate on the problem more if I am a little too confusing ! On 12 August 2010 16:20, Cristiano Sumariva sumar...@gmail.com wrote: If it is a display problem why not try create some special symbology to overlap one line with another using different symbol strokes. So the user will se that are 2 lines overlayed. 2010/8/12 Wim Vanbelle wimvanbe...@gmail.com Hi David, I read that documentation before though. I was hoping it just hadn't been updated... Is this possibly a feature for 6.0 ? Are there any other ways how one could offset a feature in pixels, rather than in lat/long coords? Maybe I should elaborate on the original problem a little. Consider 2 line segments that lie above one another. The general idea is to 'offset' them a given x , y value, so they will both display next to one another, rather than on top of eachother. If you would however perform this code simply on lat/long values, it would imply, that when scaling your map at the most detailed zoom level, the lines would lie very far apart, and when zoomed out, they would appear to
Re: [mapserver-users] need suggestions to implement simple dynamic zoom, pan select capabilities?!!
Usually, when displaying mapserver data on basemap layers such as openlayers, or directly on google / bing maps, you would use their tiling system. There's examples here of how you would do this in openlayers : http://docs.openlayers.org/library/spherical_mercator.html On 13 August 2010 07:16, mani2604 mani2...@gmail.com wrote: hi there... I've been using phpmapscript for on-the fly query displaying the resultant images... Now that I've got this problem that I tried using both mscross openlayers to display the image but somehow I cud not work it out.. I mean in both the above frameworks we need to specify the output image in the sort of URL tag-line style(wms) as below... eg:- http://localhost/index.php?mode=mapmap=/ms4w/apache/htdocs/india_roads1.mapmapext=60+7+102+38.5mapsize=640+480layers=SARDINIA%20india_ds%20IND_water_areas_dcw%20undefined Or may be I am wrong..Can we just specify the location of the resultant image and add all those dynamic zoom,pan functionality in 'Open Layers' i am sory If I am not clear enough but i need some suggestions for some simple script like mscross or soo where I need to add all those dynamic functions to my output image... that's it Thanks...!!@ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/need-suggestions-to-implement-simple-dynamic-zoom-pan-select-capabilities-tp5418885p5418885.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 mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] how to disappear Warning: session_start() in the page?
Hi all, i got message (for preview- i attached the page in attachment-sessionerror2.jpg) : Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at I:\ms4w\apps\appweb\htdocs\index_spatialphtml.phtml:6) in I:\ms4w\apps\appweb\htdocs\common\session\session.php509 on line i have mapfile and template that already could show in the initialize page named index_cobacham.phtml Then my html + php = index_spatialphtml.phtml i put ?php include (index_cobacham.phtml)? above the syntax html. So, what should i do? Thanks :) here the index_spatialphtml.phtml http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleindex/title style type=text/css !-- body { font: 100% Verdana, Arial, Helvetica, sans-serif; background: #66; margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */ padding: 0; text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */ color: #00; background-image: url(./images/Background.gif); } .oneColElsCtr #container { width: 46em; background: #FF; margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */ border: 1px solid #00; text-align: left; /* this overrides the text-align: center on the body element. */ } .oneColElsCtr #mainContent { padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */ } .style1 {color: #FF} a:link { color: #96711D; text-decoration: none; } a:visited { color: #A99559; text-decoration: none; } a:hover { color: #99; text-decoration: underline; } a:active { color: #00; text-decoration: none; } .style2 {color: #00} -- /style/head body class=oneColElsCtr div id=container div id=mainContent table width=713 border=1 tr background=./images/Background.gif th width=709 scope=col align=centerp class=style1PETA SPASIAL PENYEBARAN PENYAKIT DBD/p p class=style1 KOTA SURAKARTA/p/th /tr /table table width=717 border=1 cellpadding=0 cellspacing=0 tr th width=138 scope=coldiv align=centera href=index.htmlBeranda/a/div/th th width=171 scope=coldiv align=centera href=peta.htmlPeta Surakarta/a/div/th th width=127 scope=coldiv align=centera href=berita.htmlBerita/a/div/th th width=147 scope=coldiv align=centera href=tentang.htmlBuku Tamu/a/div/th th width=122 scope=coldiv align=centera href=tentang.html target=_blank class=style2Tentang/a/div/th /tr /table ?php include (./index_cobacham.phtml); ? /body /html ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] how to disappear Warning: session_start() in the page?
this is the attached picture-sessionerror2.jpg attachment: sessionerror2.JPG___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] logging GDAL queries
Hi All I am using MapServer + GDAL to render GeoRasters and I am having very poor performance reading GeoRasters at a high zoom level... over 13... it would take even 20 seconds per tile... Is it possible to log the GDAL queries that MapServer is doing? (and the SQL queries that GDAL is doing ?) thanks -- Sebastian E. Ovide ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] logging GDAL queries
Add CONFIG CPL_DEBUG ON to your MAP object in the MAP file. Probably wise to add DEBUG 5 to your MAP and LAYER as well. Also add something like: CONFIG MS_ERRORFILE stderr and then check your Apache error log. Best regards, Bart -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl On Aug 13, 2010, at 10:33 AM, Sebastian E. Ovide wrote: Hi All I am using MapServer + GDAL to render GeoRasters and I am having very poor performance reading GeoRasters at a high zoom level... over 13... it would take even 20 seconds per tile... Is it possible to log the GDAL queries that MapServer is doing? (and the SQL queries that GDAL is doing ?) thanks -- Sebastian E. Ovide ___ 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] Re: GDAL with MrSID
Even compiling is a option download buildkit and uncomment mrsid support statements in nmake.opt. That will ensure support of mr. sid files. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GDAL-with-MrSID-tp5416465p5419335.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] Point/annotation labels and tiles
Hi list, I'm a bit lost.I'm creating tiles with a php batch script and i have some issues regarding points labels. End of label don't appear on neighbouring tile. label is clipped because only one tile extent know about the presence of the point. I'm using the folowing paramaters but it doesn't help : Map level : METADATA labelcache_map_edge_buffer -10 END Layer level layer (type=annotation): PROCESSING LABEL_NO_CLIP=1 Label level : LABEL COLOR 21 21 21 FONT arial TYPE truetype SIZE 10 POSITION lr FORCE true PARTIALS true END http://osgeo-org.1803224.n2.nabble.com/file/n5419368/labels.png Any idea would be very welcome. Ludovic Mapserver 5.6.5 -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Point-annotation-labels-and-tiles-tp5419368p5419368.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] Point/annotation labels and tiles
You must use PARTIALS false in this case. regards, thomas On Fri, Aug 13, 2010 at 11:39, Ludovic Gnemmi lgne...@rgd73-74.fr wrote: Hi list, I'm a bit lost.I'm creating tiles with a php batch script and i have some issues regarding points labels. End of label don't appear on neighbouring tile. label is clipped because only one tile extent know about the presence of the point. I'm using the folowing paramaters but it doesn't help : Map level : METADATA labelcache_map_edge_buffer -10 END Layer level layer (type=annotation): PROCESSING LABEL_NO_CLIP=1 Label level : LABEL COLOR 21 21 21 FONT arial TYPE truetype SIZE 10 POSITION lr FORCE true PARTIALS true END http://osgeo-org.1803224.n2.nabble.com/file/n5419368/labels.png Any idea would be very welcome. Ludovic Mapserver 5.6.5 -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Point-annotation-labels-and-tiles-tp5419368p5419368.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 mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: Point/annotation labels and tiles
Thanks Thomas, When i set PARTIALS false, nothing change. I received exactly the same 2 tiles. When i set PARTIALS false FORCE false, the label wich is in the edge disappears on the 2 tiles. i don't want to loose labels :) How can i do ? Thanks for your help Ludovic -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Point-annotation-labels-and-tiles-tp5419368p5419480.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] logging GDAL queries
Sebastian, Sebastian E. Ovide wrote: Hi All I am using MapServer + GDAL to render GeoRasters and I am having very poor performance reading GeoRasters at a high zoom level... over 13... it would take even 20 seconds per tile... Did you generate pyramids? Is it possible to log the GDAL queries that MapServer is doing? (and the SQL queries that GDAL is doing ?) thanks -- Sebastian E. Ovide ___ 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] logging GDAL queries
yep I did... and the weir thing is that generating the images from far away zoom under 12... it performs very well... not sure why it doesn't in the levels 13-17 for that reason I was trying to find the SQL queries On Fri, Aug 13, 2010 at 12:01 PM, Lucena, Ivan ivan.luc...@pmldnet.comwrote: Sebastian, Sebastian E. Ovide wrote: Hi All I am using MapServer + GDAL to render GeoRasters and I am having very poor performance reading GeoRasters at a high zoom level... over 13... it would take even 20 seconds per tile... Did you generate pyramids? Is it possible to log the GDAL queries that MapServer is doing? (and the SQL queries that GDAL is doing ?) thanks -- Sebastian E. Ovide ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Sebastian E. Ovide ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] logging GDAL queries
Interesting. Can you post your gdalinfo report with -mdd oracle option? What are the versions your are running (GDAL,Oracle)? Older version of the driver used to run a new query every time you change levels. Sebastian E. Ovide wrote: yep I did... and the weir thing is that generating the images from far away zoom under 12... it performs very well... not sure why it doesn't in the levels 13-17 for that reason I was trying to find the SQL queries On Fri, Aug 13, 2010 at 12:01 PM, Lucena, Ivan ivan.luc...@pmldnet.com mailto:ivan.luc...@pmldnet.com wrote: Sebastian, Sebastian E. Ovide wrote: Hi All I am using MapServer + GDAL to render GeoRasters and I am having very poor performance reading GeoRasters at a high zoom level... over 13... it would take even 20 seconds per tile... Did you generate pyramids? Is it possible to log the GDAL queries that MapServer is doing? (and the SQL queries that GDAL is doing ?) thanks -- Sebastian E. Ovide ___ mapserver-users mailing list mapserver-users@lists.osgeo.org mailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Sebastian E. Ovide ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] logging GDAL queries
sure... se...@seanspc:~/mapserver/mapserver-5.6.5$ gdalinfo --version GDAL 1.7.2, released 2010/04/23 se...@seanspc:~/mapserver/mapserver-5.6.5$ gdalinfo georaster:geoserver,geoserver,MFPRODUK_11G,fluvd04q200pj,georaster,id=1 -mdd oracle Driver: GeoRaster/Oracle Spatial GeoRaster Files: none associated Size is 190325, 271423 Coordinate System is: PROJCS[Popular Visualisation CRS / Mercator (deprecated), GEOGCS[Popular Visualisation CRS, DATUM[Popular_Visualisation_Datum, SPHEROID[Popular Visualisation Sphere,6378137,0, AUTHORITY[EPSG,7059]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY[EPSG,6055]], PRIMEM[Greenwich,0, AUTHORITY[EPSG,8901]], UNIT[degree,0.01745329251994328, AUTHORITY[EPSG,9122]], AUTHORITY[EPSG,4055]], UNIT[metre,1, AUTHORITY[EPSG,9001]], PROJECTION[Mercator_1SP], PARAMETER[central_meridian,0], PARAMETER[scale_factor,1], PARAMETER[false_easting,0], PARAMETER[false_northing,0], EXTENSION[PROJ4,+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgri...@null +wktext +no_defs], AUTHORITY[EPSG,3785], AXIS[X,EAST], AXIS[Y,NORTH]] Origin = (-703633.464883987908252,7805920.616936270147562) Pixel Size = (4.999,-5.000) Metadata (oracle): TABLE_NAME=fluvd04q200pj COLUMN_NAME=georaster RDT_TABLE_NAME=RDT_FLUVD04Q200PJ RASTER_ID=62 METADATA=georasterMetadata xmlns= http://xmlns.oracle.com/spatial/georaster; objectInfo rasterType20001/rasterType isBlankfalse/isBlank defaultRed1/defaultRed defaultGreen1/defaultGreen defaultBlue1/defaultBlue /objectInfo rasterInfo cellRepresentationUNDEFINED/cellRepresentation cellDepth8BIT_U/cellDepth NODATA255/NODATA totalDimensions2/totalDimensions dimensionSize type=ROW size271423/size /dimensionSize dimensionSize type=COLUMN size190325/size /dimensionSize ULTCoordinate row0/row column0/column /ULTCoordinate blocking typeREGULAR/type totalRowBlocks1061/totalRowBlocks totalColumnBlocks744/totalColumnBlocks rowBlockSize256/rowBlockSize columnBlockSize256/columnBlockSize /blocking interleavingBIP/interleaving pyramid typeDECREASE/type resamplingNN/resampling maxLevel11/maxLevel /pyramid compression typeDEFLATE/type /compression /rasterInfo spatialReferenceInfo isReferencedtrue/isReferenced isRectifiedtrue/isRectified SRID3785/SRID spatialResolution dimensionType=X resolution5/resolution /spatialResolution spatialResolution dimensionType=Y resolution5/resolution /spatialResolution modelCoordinateLocationCENTER/modelCoordinateLocation modelTypeFunctionalFitting/modelType polynomialModel rowOff=0 columnOff=0 xOff=0 yOff=0 zOff=0 rowScale=1 columnScale=1 xScale=1 yScale=1 zScale=1 pPolynomial pType=1 nVars=2 order=1 nCoefficients=3 polynomialCoefficients1561183.623387254 0 -0.2/polynomialCoefficients /pPolynomial qPolynomial pType=1 nVars=0 order=0 nCoefficients=1 polynomialCoefficients1/polynomialCoefficients /qPolynomial rPolynomial pType=1 nVars=2 order=1 nCoefficients=3 polynomialCoefficients140726.1929767976 0.2 0/polynomialCoefficients /rPolynomial sPolynomial pType=1 nVars=0 order=0 nCoefficients=1 polynomialCoefficients1/polynomialCoefficients /sPolynomial /polynomialModel /spatialReferenceInfo layerInfo layerDimensionBAND/layerDimension objectLayer layerNumber0/layerNumber layerDimensionOrdinate0/layerDimensionOrdinate layerID/ colorMap colors cell value=1 red=255 green=0 blue=0 alpha=100/ cell value=2 red=0 green=255 blue=0 alpha=100/ cell value=3 red=0 green=0 blue=255 alpha=100/ cell value=4 red=150 green=50 blue=100 alpha=100/ cell value=255 red=0 green=0 blue=0 alpha=0/ /colors /colorMap /objectLayer /layerInfo /georasterMetadata Image Structure Metadata: INTERLEAVE=PIXEL COMPRESSION=DEFLATE Corner Coordinates: Upper Left ( -703633.465, 7805920.617) ( 6d19'15.05W, 57d 2'52.80N) Lower Left ( -703633.465, 6448805.617) ( 6d19'15.05W, 49d49'30.04N) Upper Right ( 247991.535, 7805920.617) ( 2d13'39.89E, 57d 2'52.80N) Lower Right ( 247991.535, 6448805.617) ( 2d13'39.89E, 49d49'30.04N) Center ( -227820.965, 7127363.117) ( 2d 2'47.58W, 53d35'23.19N) Band 1 Block=256x256 Type=Byte, ColorInterp=Gray NoData Value=255 Overviews: 95162x135711, 47581x67855, 23790x33927, 11895x16963, 5947x8481, 2973x4240, 1486x2120, 743x1060, 371x530, 185x265, 92x132 On Fri, Aug 13, 2010 at 12:32 PM, Lucena, Ivan ivan.luc...@pmldnet.comwrote: Interesting. Can you post your gdalinfo report with -mdd oracle option? What are the
Re: [mapserver-users] logging GDAL queries
Thanks Bart... I can see the debug info and the queries now On Fri, Aug 13, 2010 at 9:36 AM, Bart van den Eijnden bart...@osgis.nlwrote: Add CONFIG CPL_DEBUG ON to your MAP object in the MAP file. Probably wise to add DEBUG 5 to your MAP and LAYER as well. Also add something like: CONFIG MS_ERRORFILE stderr and then check your Apache error log. Best regards, Bart -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl On Aug 13, 2010, at 10:33 AM, Sebastian E. Ovide wrote: Hi All I am using MapServer + GDAL to render GeoRasters and I am having very poor performance reading GeoRasters at a high zoom level... over 13... it would take even 20 seconds per tile... Is it possible to log the GDAL queries that MapServer is doing? (and the SQL queries that GDAL is doing ?) thanks -- Sebastian E. Ovide ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Sebastian E. Ovide ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: logging GDAL queries
I think there are 11 pyramid levels. could that be a problem? I am not an expert in GeoRaster, is it possible to create internal tiles in GeoRaster? if yes then, it may help you enhancing the performance -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/logging-GDAL-queries-tp5419225p5419742.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] Re: logging GDAL queries
Sumit, The size of the pyramid image at each level is determined by the original image size and the pyramid level, according to the following formulas: r(n) = (int)(r(0) / 2^n) c(n) = (int)(c(0) / 2^n) there are strange queries been executed for example, at ANY zoom level I can see this one: (see level 3 !) [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] GDAL: GDALOpen(georaster:geoserver,geoserver,MFPRODUK_11G,fluvd04q200pj,georaster,id=1, this=0x2986210) succeeds as GeoRaster. [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] PL/SQL: [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] SELECT RASTERBLOCK [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] FROM RDT_FLUVD04Q200PJ [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] WHERE RASTERID = :1 AND [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40]PYRAMIDLEVEL = :3 [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] ORDER BY [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40]BANDBLOCKNUMBER ASC, [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40]ROWBLOCKNUMBER ASC, [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] COLUMNBLOCKNUMBER ASC [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] GDAL: GDALOpen(georaster:geoserver,geoserver,MFPRODUK_11G,fluvd04q200pj,georaster,id=1, this=0x18be210) succeeds as GeoRaster. [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] PL/SQL: [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] SELECT RASTERBLOCK [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] FROM RDT_FLUVD04Q200PJ [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] WHERE RASTERID = :1 AND [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40]PYRAMIDLEVEL = :3 [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] ORDER BY [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40]BANDBLOCKNUMBER ASC, [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40]ROWBLOCKNUMBER ASC, [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] COLUMNBLOCKNUMBER ASC [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] why ? On Fri, Aug 13, 2010 at 12:56 PM, Sumit Sharma sumit...@hotmail.com wrote: I think there are 11 pyramid levels. could that be a problem? I am not an expert in GeoRaster, is it possible to create internal tiles in GeoRaster? if yes then, it may help you enhancing the performance -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/logging-GDAL-queries-tp5419225p5419742.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 -- Sebastian E. Ovide ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] logging GDAL queries
Sebastian, You are using a very small block size, maybe because you are also using ArcGIS products and they only support Oracle GeoRaster with 256x256 blocking. Is that right? Because of that, to access your GeoRaster object, the GDAL driver is requesting a very large array of BLOB (100 approximately). That can make your sever such-up memory from the machine where it is running and it is probably using virtual memory (disk) what is really slow. It also uses some memory on the client side just to hold the array too but if you are running everything (Mapserver,Oracle) on the same machine that will adds up. We are aware of that problem but it would be very helpful if you could file a bug report on GDAL's trac [http://trac.osgeo.org/gdal/] Thanks. Just as curiosity. Did you loaded that image with gdal_translate? How long it took and long does it takes to generate pyramids? Ha, you forgot to say what version of Oracle you are using. Best regards, Ivan ---Original Message--- From: Sebastian E. Ovide sebastian.ov...@gmail.com To: Lucena, Ivan ivan.luc...@pmldnet.com Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] logging GDAL queries Sent: Aug 13 '10 06:44 sure... se...@seanspc:~/mapserver/mapserver-5.6.5$ gdalinfo --version GDAL 1.7.2, released 2010/04/23 se...@seanspc:~/mapserver/mapserver-5.6.5$ gdalinfo georaster:geoserver,geoserver,MFPRODUK_11G,fluvd04q200pj,georaster,id=1 -mdd oracle Driver: GeoRaster/Oracle Spatial GeoRaster Files: none associated Size is 190325, 271423 Coordinate System is: PROJCS[Popular Visualisation CRS / Mercator (deprecated), GEOGCS[Popular Visualisation CRS, DATUM[Popular_Visualisation_Datum, SPHEROID[Popular Visualisation Sphere,6378137,0, AUTHORITY[EPSG,7059]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY[EPSG,6055]], PRIMEM[Greenwich,0, AUTHORITY[EPSG,8901]], UNIT[degree,0.01745329251994328, AUTHORITY[EPSG,9122]], AUTHORITY[EPSG,4055]], UNIT[metre,1, AUTHORITY[EPSG,9001]], PROJECTION[Mercator_1SP], PARAMETER[central_meridian,0], PARAMETER[scale_factor,1], PARAMETER[false_easting,0], PARAMETER[false_northing,0], EXTENSION[PROJ4,+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgri...@null +wktext +no_defs], AUTHORITY[EPSG,3785], AXIS[X,EAST], AXIS[Y,NORTH]] Origin = (-703633.464883987908252,7805920.616936270147562) Pixel Size = (4.999,-5.000) Metadata (oracle): TABLE_NAME=fluvd04q200pj COLUMN_NAME=georaster RDT_TABLE_NAME=RDT_FLUVD04Q200PJ RASTER_ID=62 METADATA=georasterMetadata xmlns=[LINK: http://xmlns.oracle.com/spatial/georaster] http://xmlns.oracle.com/spatial/georaster; objectInfo rasterType20001/rasterType isBlankfalse/isBlank defaultRed1/defaultRed defaultGreen1/defaultGreen defaultBlue1/defaultBlue /objectInfo rasterInfo cellRepresentationUNDEFINED/cellRepresentation cellDepth8BIT_U/cellDepth NODATA255/NODATA totalDimensions2/totalDimensions dimensionSize type=ROW size271423/size /dimensionSize dimensionSize type=COLUMN size190325/size /dimensionSize ULTCoordinate row0/row column0/column /ULTCoordinate blocking typeREGULAR/type totalRowBlocks1061/totalRowBlocks totalColumnBlocks744/totalColumnBlocks rowBlockSize256/rowBlockSize columnBlockSize256/columnBlockSize /blocking interleavingBIP/interleaving pyramid typeDECREASE/type resamplingNN/resampling maxLevel11/maxLevel /pyramid compression typeDEFLATE/type /compression /rasterInfo spatialReferenceInfo isReferencedtrue/isReferenced isRectifiedtrue/isRectified SRID3785/SRID spatialResolution dimensionType=X resolution5/resolution /spatialResolution spatialResolution dimensionType=Y resolution5/resolution /spatialResolution modelCoordinateLocationCENTER/modelCoordinateLocation modelTypeFunctionalFitting/modelType polynomialModel rowOff=0 columnOff=0 xOff=0 yOff=0 zOff=0 rowScale=1 columnScale=1 xScale=1 yScale=1 zScale=1 pPolynomial pType=1 nVars=2 order=1 nCoefficients=3 polynomialCoefficients1561183.623387254 0 -0.2/polynomialCoefficients /pPolynomial qPolynomial pType=1 nVars=0 order=0 nCoefficients=1 polynomialCoefficients1/polynomialCoefficients /qPolynomial rPolynomial pType=1 nVars=2 order=1 nCoefficients=3 polynomialCoefficients140726.1929767976 0.2 0/polynomialCoefficients /rPolynomial sPolynomial pType=1 nVars=0
Re: [mapserver-users] Re: logging GDAL queries
Interesting. Why does it need to perform two requires for the same level? I believe that mapserver is doing that. It is running GDALOpen() twice on the same raster/level. In fact it should run that query just once, at the first GDALOpen(), like QuantumGIS does. So for each zoom level it goes through the cursor (array of BLOB) built by that query. But don't be scary of that. It is not loading any raster block in memory at that time. But I understand that by the nature of Mapserver and that GDAL expectation is file reader, that is how it works. It opens and close files several times. Good thing is that at least while GDAL is in memory we can reuse the database connection. It might be part of the solution. Regards, Ivan ---Original Message--- From: Sebastian E. Ovide sebastian.ov...@gmail.com To: Sumit Sharma sumit...@hotmail.com Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: logging GDAL queries Sent: Aug 13 '10 07:58 Sumit, The size of the pyramid image at each level is determined by the original image size and the pyramid level, according to the following formulas: r(n) = (int)(r(0) / 2^n) c(n) = (int)(c(0) / 2^n) there are strange queries been executed for example, at ANY zoom level I can see this one: (see level 3 !) [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] GDAL: GDALOpen(georaster:geoserver,geoserver,MFPRODUK_11G,fluvd04q200pj,georaster,id=1, this=0x2986210) succeeds as GeoRaster. [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] PL/SQL: [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] SELECT RASTERBLOCK [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] FROM RDT_FLUVD04Q200PJ [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] WHERE RASTERID = :1 AND [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] PYRAMIDLEVEL = :3 [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] ORDER BY [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] BANDBLOCKNUMBER ASC, [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] ROWBLOCKNUMBER ASC, [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] COLUMNBLOCKNUMBER ASC [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] GDAL: GDALOpen(georaster:geoserver,geoserver,MFPRODUK_11G,fluvd04q200pj,georaster,id=1, this=0x18be210) succeeds as GeoRaster. [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] PL/SQL: [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] SELECT RASTERBLOCK [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] FROM RDT_FLUVD04Q200PJ [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] WHERE RASTERID = :1 AND [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] PYRAMIDLEVEL = :3 [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] ORDER BY [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] BANDBLOCKNUMBER ASC, [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] ROWBLOCKNUMBER ASC, [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] COLUMNBLOCKNUMBER ASC [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] why ? On Fri, Aug 13, 2010 at 12:56 PM, Sumit Sharma [LINK: mailto:sumit...@hotmail.com] sumit...@hotmail.com wrote: I think there are 11 pyramid levels. could that be a problem? I am not an expert in GeoRaster, is it possible to create internal tiles in GeoRaster? if yes then, it may help you enhancing the performance -- View this message in context: [LINK: http://osgeo-org.1803224.n2.nabble.com/logging-GDAL-queries-tp5419225p5419742.html] http://osgeo-org.1803224.n2.nabble.com/logging-GDAL-queries-tp5419225p5419742.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list [LINK: mailto:mapserver-us...@lists.osgeo.org] mapserver-users@lists.osgeo.org [LINK: http://lists.osgeo.org/mailman/listinfo/mapserver-users] http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Sebastian E. Ovide ___ mapserver-users mailing list [LINK: compose.php?to=mapserver-us...@lists.osgeo.org] mapserver-users@lists.osgeo.org [LINK: http://lists.osgeo.org/mailman/listinfo/mapserver-users] 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] Need help tracking down mapserv seg fault
Hello All: Please pardon the very lengthy post. I have attempted to collect as much data as I could think of. Summary: FGS95 with MapServer 5.4.1 on Ubuntu Server, using OGR JOIN results in mapserv seg fault when run from browser, works fine from shp2img. Detailed: I have an FGs95 install on Ubuntu Server 9.10, using MapServer 5.4.1 on the back with a mixed shapefile/PostGIS datastore, GeoMoose 2.2 front-end. Everything is working very nicely except for my current problem. I have a need to color polygons stored in a shapefile, CLASSified based on attributes in an external csv-file. Guidance found in the ether indicates that the only way to do this with MapServer is to use an OGR connection between the shapefile and the csv-file. Using tips found here and there I have been able to construct a SELECT statement in the DATA directive that allows shp2img to create a PNG that looks just like I hoped it would (see attached), but I must confess that I don't fully understand how as the SELECT statement does not look like what I am used to seeing in some proprietary products. I am clearly in need of an OGR education (with lots of example code). The LAYER section in the mapfile is LAYER # Parish Boundary Polygon Outline Layer NAME 'parishes_on_boiladv' CONNECTIONTYPE OGR CONNECTION webmaps_parishes.shp DATA SELECT * FROM webmaps_parishes LEFT JOIN 'bwa.csv'.bwa ON webmaps_parishes.FIPS = bwa.FIPS STATUS default TYPE polygon CLASSITEM PercentageOut CLASS EXPRESSION ([PercentageOut] 0 AND [PercentageOut] = 10) NAME 0 - 10% STYLE COLOR 56 168 0 END END #class (continues with several more classes). The shapefile and csv-file are stored in the same directory. Both have a field FIPS which is the field I wish to join on. The PercentageOut field is in the csv-file. The DATA statement appears to work, but I looks really odd to me. Is there a way to get a table output from the OGR JOIN to study? I have set DEBUG 5 at the MAP level and the LAYER level to troubleshoot, but the process segfaults before any error is written to the ms_error file. The Apache and system logs contain only this when testing from localhost: /opt/fgs/www/logs/error_log: [Thu Aug 12 14:53:02 2010] [error] [client 127.0.1.1] Premature end of script headers: mapserv /var/log/messages: Aug 12 14:53:02 geoview kernel: [12879514.857356] mapserv[24114]: segfault at 0 ip 0945e714 sp bf9058dc error 6 I saw another post with similar issues suggesting it's a library issue, discussing the LD_LIBRARY_PATH environment variable not being set properly for the Apache user. As far as I can tell this variable points to the right place in /opt/fgs/, but to be certain I added a SetEnv/PassEnv statement in the fgs-version of httpd.conf without any change in behavior. In both /opt/fgs/etc/conf/httpd.conf and the local user environment I have LD_LIBRARY_PATH set to /opt/fgs/lib:/opt/fgs/www/lib. Is there a way to see the environment for the Apache user? I don't know how important this is. As mentioned everything else has been and is working very well. Could there be some other conflicting system library picked up? The URL I test with is /cgi-bin/mapserv?map=/opt/fgs/apps/geomoose2/maps/sdwp/boil_adv/webmaps_boil_advisories.mapmode=map and I have confirmed all works fine when pointing the URL to other mapfiles. I set the file and directory permissions to full access to all users temporarily to test and there is no difference in behavior. When I run shp2img on the same mapfile the correct image is returned and there are no errors indicated in the ms_error file. The only oddity I see is in the path used by OGROpen: msLoadMap(): 0.033s msOGRFileOpen(webmaps_parishes.shp)... OGROPen(/opt/fgs/apps/geomoose2/maps/sdwp/boil_adv/./webmaps_parishes.shp) msConnPoolRegister(parishes_on_boiladv,webmaps_parishes.shp,0x9fdeb68) msOGRFileWhichShapes: Setting spatial filter to -10515009.640986 3370567.00 -9840476.359014 3918467.00 msOGRFileNextShape: Returning shape=0, tile=0 *** 62 shapes snipped here, there are 64 total polygons *** msOGRFileNextShape: Returning shape=63, tile=0 msOGRFileNextShape: Returning MS_DONE (no more shapes) msOGRLayerClose(webmaps_parishes.shp). msOGRFileClose(/opt/fgs/apps/geomoose2/maps/sdwp/boil_adv/./webmaps_parishes.shp,-1). msConnPoolRelease(parishes_on_boiladv,webmaps_parishes.shp,0x9fdeb68) msConnPoolClose(webmaps_parishes.shp,0x9fdeb68) msDrawMap(): Layer 0 (parishes_on_boiladv), 0.118s msDrawMap(): Drawing Label Cache, 0.000s msDrawMap() total time: 0.126s msSaveImage() total time: 0.311s msFreeMap(): freeing map at 0x9d36ac8. freeLayer(): freeing layer at 0x9d3d7d8. shp2img total time: 0.472s What else can I test? If you made it this far, thanks for taking the time to read! I am very grateful for any and all advice. -- Johan Forsman Geologist Safe Drinking Water Program Louisiana Department of Health and Hospitals
Re: [mapserver-users] logging GDAL queries
On Fri, Aug 13, 2010 at 1:59 PM, Ivan Lucena ivan.luc...@pmldnet.comwrote: Sebastian, You are using a very small block size, maybe because you are also using ArcGIS products and they only support Oracle GeoRaster with 256x256 blocking. Is that right? nop... I guess that 256x256 if the default gdal_translate block size ? Because of that, to access your GeoRaster object, the GDAL driver is requesting a very large array of BLOB (100 approximately). That can make your sever such-up memory from the machine where it is running and it is probably using virtual memory (disk) what is really slow. do you mean where MapServer is running ? top - 14:41:31 up 7 days, 6:20, 10 users, load average: 2.81, 1.92, 1.20 Tasks: 340 total, 2 running, 338 sleeping, 0 stopped, 0 zombie Cpu(s): 11.8%us, 10.4%sy, 7.7%ni, 62.1%id, 0.0%wa, 0.0%hi, 8.0%si, 0.0%st Mem: 12331240k total, 5992136k used, 6339104k free, 189416k buffers Swap: 9084716k total, 703708k used, 8381008k free, 1481992k cached PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 24850 www-data 20 0 533m 330m 18m R 14 2.7 0:00.94 mapserv 24852 www-data 20 0 532m 329m 18m S 19 2.7 0:01.22 mapserv 24849 www-data 20 0 529m 326m 18m S 16 2.7 0:01.00 mapserv 24851 www-data 20 0 517m 314m 18m S 13 2.6 0:00.96 mapserv 24853 www-data 20 0 499m 296m 18m S8 2.5 0:00.75 mapserv 24854 www-data 20 0 470m 267m 18m S5 2.2 0:00.53 mapserv It also uses some memory on the client side just to hold the array too but if you are running everything (Mapserver,Oracle) on the same machine that will adds up. Oracle is running on another Machine... and is very likely that it is the bottle neck... We are aware of that problem but it would be very helpful if you could file a bug report on GDAL's trac [http://trac.osgeo.org/gdal/] Thanks. I guess that the problem is that MapServer triys to read the whole map instead of reading only tile is that correct ? Just as curiosity. Did you loaded that image with gdal_translate? How long it took and long does it takes to generate pyramids? Ha, you forgot to say what version of Oracle you are using. I loaded it with gdal in around 5 minutes... the pyramid (all levels) has been created overnight Best regards, Ivan ---Original Message--- From: Sebastian E. Ovide sebastian.ov...@gmail.com To: Lucena, Ivan ivan.luc...@pmldnet.com Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] logging GDAL queries Sent: Aug 13 '10 06:44 sure... se...@seanspc:~/mapserver/mapserver-5.6.5$ gdalinfo --version GDAL 1.7.2, released 2010/04/23 se...@seanspc:~/mapserver/mapserver-5.6.5$ gdalinfo georaster:geoserver,geoserver,MFPRODUK_11G,fluvd04q200pj,georaster,id=1 -mdd oracle Driver: GeoRaster/Oracle Spatial GeoRaster Files: none associated Size is 190325, 271423 Coordinate System is: PROJCS[Popular Visualisation CRS / Mercator (deprecated), GEOGCS[Popular Visualisation CRS, DATUM[Popular_Visualisation_Datum, SPHEROID[Popular Visualisation Sphere,6378137,0, AUTHORITY[EPSG,7059]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY[EPSG,6055]], PRIMEM[Greenwich,0, AUTHORITY[EPSG,8901]], UNIT[degree,0.01745329251994328, AUTHORITY[EPSG,9122]], AUTHORITY[EPSG,4055]], UNIT[metre,1, AUTHORITY[EPSG,9001]], PROJECTION[Mercator_1SP], PARAMETER[central_meridian,0], PARAMETER[scale_factor,1], PARAMETER[false_easting,0], PARAMETER[false_northing,0], EXTENSION[PROJ4,+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgri...@null +wktext +no_defs], AUTHORITY[EPSG,3785], AXIS[X,EAST], AXIS[Y,NORTH]] Origin = (-703633.464883987908252,7805920.616936270147562) Pixel Size = (4.999,-5.000) Metadata (oracle): TABLE_NAME=fluvd04q200pj COLUMN_NAME=georaster RDT_TABLE_NAME=RDT_FLUVD04Q200PJ RASTER_ID=62 METADATA=georasterMetadata xmlns=[LINK: http://xmlns.oracle.com/spatial/georaster] http://xmlns.oracle.com/spatial/georaster; objectInfo rasterType20001/rasterType isBlankfalse/isBlank defaultRed1/defaultRed defaultGreen1/defaultGreen defaultBlue1/defaultBlue /objectInfo rasterInfo cellRepresentationUNDEFINED/cellRepresentation cellDepth8BIT_U/cellDepth NODATA255/NODATA totalDimensions2/totalDimensions dimensionSize type=ROW size271423/size /dimensionSize dimensionSize type=COLUMN size190325/size /dimensionSize ULTCoordinate row0/row column0/column /ULTCoordinate blocking
[mapserver-users] SUSE 10 and GDAL with MrSID
Hello, I am looking for some good documentation on compiling GDAL 1.6 or 1.7 with MrSID capabilities on a SUSE 10 service pack3 64 bit box. Thanks in advance for your help. EW ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] logging GDAL queries
Sebastian, ---Original Message--- From: Sebastian E. Ovide sebastian.ov...@gmail.com To: Ivan Lucena ivan.luc...@pmldnet.com Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] logging GDAL queries Sent: Aug 13 '10 09:27 On Fri, Aug 13, 2010 at 1:59 PM, Ivan Lucena [LINK: mailto:ivan.luc...@pmldnet.com] ivan.luc...@pmldnet.com wrote: Sebastian, You are using a very small block size, maybe because you are also using ArcGIS products and they only support Oracle GeoRaster with 256x256 blocking. Is that right? nop... I guess that 256x256 if the default gdal_translate block size ? That is the default on GDAL/GeoRaster driver but you can change it using -co BLOCKXSIZE and -co BLOCKYSIZE. But that would require you to load the image again (and generate Pyramids again...) Because of that, to access your GeoRaster object, the GDAL driver is requesting a very large array of BLOB (100 approximately). That can make your sever such-up memory from the machine where it is running and it is probably using virtual memory (disk) what is really slow. do you mean where MapServer is running ? top - 14:41:31 up 7 days, 6:20, 10 users, load average: 2.81, 1.92, 1.20 Tasks: 340 total, 2 running, 338 sleeping, 0 stopped, 0 zombie Cpu(s): 11.8%us, 10.4%sy, 7.7%ni, 62.1%id, 0.0%wa, 0.0%hi, 8.0%si, 0.0%st Mem: 12331240k total, 5992136k used, 6339104k free, 189416k buffers Swap: 9084716k total, 703708k used, 8381008k free, 1481992k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 24850 www-data 20 0 533m 330m 18m R 14 2.7 0:00.94 mapserv 24852 www-data 20 0 532m 329m 18m S 19 2.7 0:01.22 mapserv 24849 www-data 20 0 529m 326m 18m S 16 2.7 0:01.00 mapserv 24851 www-data 20 0 517m 314m 18m S 13 2.6 0:00.96 mapserv 24853 www-data 20 0 499m 296m 18m S 8 2.5 0:00.75 mapserv 24854 www-data 20 0 470m 267m 18m S 5 2.2 0:00.53 mapserv Yeah. I am sorry. I called Mapserver a client :) It is a Oracle client in that case. You probably have another nice machine running Oracle. That is not the problem. It also uses some memory on the client side just to hold the array too but if you are running everything (Mapserver,Oracle) on the same machine that will adds up. Oracle is running on another Machine... and is very likely that it is the bottle neck... Maybe not but I believe you have tools on Enterprise Manager to show the volume and speed of traffic. We are aware of that problem but it would be very helpful if you could file a bug report on GDAL's trac [[LINK: http://trac.osgeo.org/gdal/] http://trac.osgeo.org/gdal/] Thanks. I guess that the problem is that MapServer triys to read the whole map instead of reading only tile is that correct ? Just as curiosity. Did you loaded that image with gdal_translate? How long it took and long does it takes to generate pyramids? Ha, you forgot to say what version of Oracle you are using. I loaded it with gdal in around 5 minutes... the pyramid (all levels) has been created overnight You original file was 51 Gb and it was loaded in 5 minutes ! See, forget all about network traffic. That is just great. Note that it doesn't matter if you generate pyramids on PL/SQL or gdaladdo, the GDAL driver will call the same PL/SQL statement that you would write yourself. So I believe that the problem is that Mapserver need to call GDALOpen() several times on that GeoRaster and that makes the GDAL driver to run the main-big-query several times. That needs to be addressed some how. Regards, Ivan ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Offset values from database
I would like to shade the inside of a polygon along it's border. Using the polygon border as the edge. Making wider lines means offsetting the poygon internally or putting up with the edge not being specifically accurate. bobb Wim Vanbelle wimvanbe...@gmail.com wrote: Would it not be possible to draw the polygon as 2 different polygons (the inner polygon the outer using the postgis functions)? You could specify a fixed offset for one or the other. On the other hand, if you just have 1 polygon (with a single line, so no inner polygons) and you're trying to accomplish a visual effect that the inside of the polygon lies further away, i would accomplish this by drawing a thicker border. Or you could possibly use the asymmetric line drawing functions that are available. Maybe give a more concrete example of what exactly you are trying to do. On 12 August 2010 22:46, Bob Basques bob.basq...@ci.stpaul.mn.us wrote: All, Wondering, would this work for INSIDE/OUTSIDE situations with regard to polygon drawing? Or is the left/right sides of the line strictly relying on the from/to aspects of how the polygon was drawn (clockwise/counterclockwise) This would be handy for off-setting to (ONLY) the inside of a polygon for example. Thanks bobb Wim Vanbelle wimvanbe...@gmail.com wrote: Thank you very much everyone. And especially Thomas. That was indeed what I was looking for. You saved me a lot of work! Much appreciated. On 12 August 2010 17:50, Fawcett, David (MPCA) david.fawc...@state.mn.us wrote: Thanks Thomas That looks nice in my test example. David. -Original Message- From: thomas bonfort [mailto:thomas.bonf...@gmail.com] Sent: Thursday, August 12, 2010 10:45 AM To: Fawcett, David (MPCA) Cc: Wim Vanbelle; mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Offset values from database the -99 is a special offset value that shifts the line as you are looking for. style color 255 0 0 offset -2 -99 width 2 end style color 0 255 0 offset 2 -99 width 2 end not perfect as there are artifacts on sharp angles, but worth a try. regards, thomas On Thu, Aug 12, 2010 at 16:56, Fawcett, David (MPCA) david.fawc...@state.mn.us wrote: Wim, You can do these offsets in pixel values at a class level, just not a feature level. This pretty much does what you are describing, although it gets a little funky when the lines are diagonal and not straight. CLASS STYLE COLOR 0 0 0 WIDTH 2 END STYLE COLOR 255 0 0 WIDTH 2 OFFSET 10 10 END STYLE COLOR 0 255 0 WIDTH 2 OFFSET -10 -10 END END David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Wim Vanbelle Sent: Thursday, August 12, 2010 9:32 AM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Offset values from database Maybe this pic helps elaborate on what i'm trying to accomplish: http://fileshare.myroute.be/exchange/asymmetriclinedrawing.png It should be noted that the distance between the 2 (new) lines, should be a fixed value over the zoomlevels. It must not be the case that at the furthest zoomlevel the lines are further apart. I've looked all over for this, but never really found a proper solution. I tried cartographic symbol drawing, but it only draws on the same side every time. Maybe I'm just doing it wrong :). On 12 August 2010 16:28, Wim Vanbelle wimvanbe...@gmail.com wrote: Hello, thanks for your feedback. The issue with this, is that the underlying linestrings (the 2 that would lie on top of eachother), have different colors :(. So they have to be moved apart from one another. I have not found a way to do this with asymmetric line drawing either, as it will always offset to the would always appear next to eachtoher (no matter what zoomlevel). I can elaborate on the problem more if I am a little too confusing ! On 12 August 2010 16:20, Cristiano Sumariva sumar...@gmail.com wrote: If it is a display problem why not try create some special symbology to overlap one line with another using different symbol strokes. So the user will se that are 2 lines overlayed. 2010/8/12 Wim Vanbelle wimvanbe...@gmail.com Hi David, I read that documentation before though. I was hoping it just hadn't been updated... Is this possibly a feature for 6.0 ? Are there any other ways how one could offset a feature in pixels, rather than in lat/long coords? Maybe I should elaborate on the original problem a little. Consider 2 line segments that lie above one another. The general idea is to 'offset' them a given x , y value, so they will both display next to one another, rather than on top of eachother. If you would however perform this code simply on lat/long values, it would imply, that when scaling your map at the most detailed zoom level, the lines would lie very far apart, and when zoomed out, they would appear to lie on top of eachother. I
Re: [mapserver-users] logging GDAL queries
Sebastian, You said: yep I did... and the weir thing is that generating the images from far away zoom under 12... it performs very well... not sure why it doesn't in the levels 13-17 for that reason I was trying to find the SQL queries But your GeoRaster Pyramid level is maxLevel11/maxLevel By the size of you image you should have 20 level. Can you run sdo_geor.generatePyramid() again changing only the number of levels, keeping the same method. That should run faster, keeping the existing pyramid levels. Please let me know how it works now. Regards, Ivan ---Original Message--- From: Ivan Lucena ivan.luc...@pmldnet.com To: Sebastian E. Ovide sebastian.ov...@gmail.com Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] logging GDAL queries Sent: Aug 13 '10 11:16 Sebastian, ---Original Message--- From: Sebastian E. Ovide sebastian.ov...@gmail.com To: Ivan Lucena ivan.luc...@pmldnet.com Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] logging GDAL queries Sent: Aug 13 '10 09:27 On Fri, Aug 13, 2010 at 1:59 PM, Ivan Lucena [LINK: mailto:ivan.luc...@pmldnet.com] ivan.luc...@pmldnet.com wrote: Sebastian, You are using a very small block size, maybe because you are also using ArcGIS products and they only support Oracle GeoRaster with 256x256 blocking. Is that right? nop... I guess that 256x256 if the default gdal_translate block size ? That is the default on GDAL/GeoRaster driver but you can change it using -co BLOCKXSIZE and -co BLOCKYSIZE. But that would require you to load the image again (and generate Pyramids again...) Because of that, to access your GeoRaster object, the GDAL driver is requesting a very large array of BLOB (100 approximately). That can make your sever such-up memory from the machine where it is running and it is probably using virtual memory (disk) what is really slow. do you mean where MapServer is running ? top - 14:41:31 up 7 days, 6:20, 10 users, load average: 2.81, 1.92, 1.20 Tasks: 340 total, 2 running, 338 sleeping, 0 stopped, 0 zombie Cpu(s): 11.8%us, 10.4%sy, 7.7%ni, 62.1%id, 0.0%wa, 0.0%hi, 8.0%si, 0.0%st Mem: 12331240k total, 5992136k used, 6339104k free, 189416k buffers Swap: 9084716k total, 703708k used, 8381008k free, 1481992k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 24850 www-data 20 0 533m 330m 18m R 14 2.7 0:00.94 mapserv 24852 www-data 20 0 532m 329m 18m S 19 2.7 0:01.22 mapserv 24849 www-data 20 0 529m 326m 18m S 16 2.7 0:01.00 mapserv 24851 www-data 20 0 517m 314m 18m S 13 2.6 0:00.96 mapserv 24853 www-data 20 0 499m 296m 18m S 8 2.5 0:00.75 mapserv 24854 www-data 20 0 470m 267m 18m S 5 2.2 0:00.53 mapserv Yeah. I am sorry. I called Mapserver a client :) It is a Oracle client in that case. You probably have another nice machine running Oracle. That is not the problem. It also uses some memory on the client side just to hold the array too but if you are running everything (Mapserver,Oracle) on the same machine that will adds up. Oracle is running on another Machine... and is very likely that it is the bottle neck... Maybe not but I believe you have tools on Enterprise Manager to show the volume and speed of traffic. We are aware of that problem but it would be very helpful if you could file a bug report on GDAL's trac [[LINK: http://trac.osgeo.org/gdal/] http://trac.osgeo.org/gdal/] Thanks. I guess that the problem is that MapServer triys to read the whole map instead of reading only tile is that correct ? Just as curiosity. Did you loaded that image with gdal_translate? How long it took and long does it takes to generate pyramids? Ha, you forgot to say what version of Oracle you are using. I loaded it with gdal in around 5 minutes... the pyramid (all levels) has been created overnight You original file was 51 Gb and it was loaded in 5 minutes ! See, forget all about network traffic. That is just great. Note that it doesn't matter if you generate pyramids on PL/SQL or gdaladdo, the GDAL driver will call the same PL/SQL statement that you would write yourself. So I believe that the problem is that Mapserver need to call GDALOpen() several times on that GeoRaster and that makes the GDAL driver to run the main-big-query several times. That needs to be addressed some how. Regards, Ivan ___ mapserver-users mailing list mapserver-users@lists.osgeo.org
[mapserver-users] How to use an ArcGIS geocoding service
I'm building a PHP/MapServer application which needs to perform geocoding. I'm aware that MapServer itself does not geocode. I intend to use a geocoding service hosted on ArcGIS Server. The intent is to have input boxes where the user can enter an address, send this to the geocoding service, and have it return coordinates of the location. Can anyone point me to an example of how to do this with PHP/Mapscript? _ Bob Bistrais, GISP Maine Office of Information Technology ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Querying with SDE data
I'm using SDE (9.3.1) data in a MapServer app, PHP-Mapscript. I am able to get the data to display, but query does not seem to work. I have templates for the data, but no good. When I try to query, I see an error with the headers: 502 gateway error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:pppre/pre Also, if it helps, here is my map file, with connections and passwords edited: LAYER NAME connectme_rds GROUP Broadband Data CONNECTION (my connection string) CONNECTIONTYPE PLUGIN PLUGIN C:/ms4w/apache/specialplugins/msplugin_sde_92.dll DATA MEGISIMS.BB_RDS,SHAPE,SDE.DEFAULT PROCESSING CLOSE_CONNECTION=DEFER STATUS ON TYPE LINE TOLERANCE 1 TEMPLATE ../../templates/broadband_query.html CLASS STYLE COLOR255 0 0 WIDTH1 END END END I'd like to get this part working first, because the next step is to join a table to the dataset, and be able query with items in that table. Does anyone have any ideas? ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] how to disappear Warning: session_start() in the page?
Thanks Mr.Sumariva for the advice but, session_start() in the page already embed in Chameleon framework at its folder in \htdocs\common\session the coding at line 509 (that shown error in the page): //start the session session_start(); register_shutdown_function( session_write_close ); // set IP if a new session if ( $bNewSession ) $_SESSION[gszRemoteAdd] = $_SERVER[REMOTE_ADDR]; /* * Check IP to see if it is the same * = */ // check if the IP has been set and validate if ( isset( $_SESSION[gszRemoteAdd] ) strlen(trim($_SESSION[gszRemoteAdd])) 0 ) { // check if IP matches current client if ( trim( $_SESSION[gszRemoteAdd] ) != trim( $_SERVER[REMOTE_ADDR] ) ) { // possible security breach void session /* if the session address is the loopback interface then it is * likely that the application was configured to use an external * address but someone is trying to test locally using localhost */ if ($_SESSION['gszRemoteAdd'] != '127.0.0.1') { $bSessionOK = false; } } } else { // possible security breach void session $bSessionOK = false; } // return success or failure and set global so we // know session has been inited. if ($bSessionOK) { $GLOBALS['session_started'] = true; } return $bSessionOK; // end intializeSession() function } function getSessionSavePath() { $szReturn = ini_get(session.save_path)./sess_.session_id()./; $szReturn = str_replace( \\, /, $szReturn ); return $szReturn; } Really need advice again Mr. Thanks From: Cristiano Sumariva sumar...@gmail.com To: elisabeth theresia dbee_ka...@yahoo.com Sent: Sat, August 14, 2010 8:57:29 AM Subject: Re: [mapserver-users] how to disappear Warning: session_start() in the page? You should break your file in 2 files. Put the session_start function at first and add it to the top of your .phtml file. The second file will contain all remaining code. When using session in pages they have to be sent before any other thing. This is a requirement in HTTP protocol. 2010/8/13 elisabeth theresia dbee_ka...@yahoo.com Hi all, i got message (for preview- i attached the page in attachment-sessionerror2.jpg) : Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at I:\ms4w\apps\appweb\htdocs\index_spatialphtml.phtml:6) in I:\ms4w\apps\appweb\htdocs\common\session\session.php509 on line i have mapfile and template that already could show in the initialize page named index_cobacham.phtml Then my html + php = index_spatialphtml.phtml i put ?php include (index_cobacham.phtml)? above the syntax html. So, what should i do? Thanks :) here the index_spatialphtml.phtml http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleindex/title style type=text/css !-- body { font: 100% Verdana, Arial, Helvetica, sans-serif; background: #66; margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */ padding: 0; text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */ color: #00; background-image: url(./images/Background.gif); } .oneColElsCtr #container { width: 46em; background: #FF; margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */ border: 1px solid #00; text-align: left; /* this overrides the text-align: center on the body element. */ } .oneColElsCtr #mainContent { padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */ } .style1 {color: #FF} a:link { color: #96711D; text-decoration: none; } a:visited { color: #A99559; text-decoration: none; } a:hover { color: #99; text-decoration: underline; } a:active { color: #00; text-decoration: none; } .style2 {color: #00} -- /style/head body class=oneColElsCtr div id=container div id=mainContent table width=713 border=1 tr background=./images/Background.gif th width=709 scope=col align=centerp class=style1PETA SPASIAL PENYEBARAN PENYAKIT DBD/p p class=style1 KOTA SURAKARTA/p/th /tr /table table width=717 border=1 cellpadding=0 cellspacing=0 tr th width=138 scope=coldiv align=centera