Hi Jukka,
can you write a small note on the OpenJUMP wiki? Yours and Landon's
discussion seems to me quite interesting, it is worth to save a trace for
users
thanks

Peppe

2013/1/18 Rahkonen Jukka <jukka.rahko...@mmmtike.fi>

>  Hi.****
>
> ** **
>
> Textpad is using a different reg exp syntax but Notepad++ accepts the
> syntax of your example.  This makes polygons from a raw Apache log file
> where the last number of the BBOX is followed either by & or space
> character.  ****
>
> ** **
>
> ^.*BBOX=([^,]*),([^,]*),([^,]*),([^& ]*).*$****
>
> POLYGON \(\($1 $2, $1 $4, $3 $4, $3 $2, $1 $2\)\)****
>
> ** **
>
> I went through some error logs, opened the failed BBOX polygons with
> OpenJUMP and revealed a data error that has been hiding for several months
> because it appears only at certain scale range. Nice.****
>
> ** **
>
> -Jukka-****
>
> ** **
>
> Michaël Michaud wrote:****
>
> ** **
>
> Hi Jukka,
>
> Can you tell us more about the use case ?
> How did these BBOX come into your text file ?
>
> If you have a text editor as clever as JEdit, you can
> simply do a search/replace with****
>
> search = ^BBOX=([^,]+),([^,]+),([^,]+),([^,]+)$  ****
>
> replace = POLYGON(($1 $2, $1 $4, $3 $4, $3 $2, $1 $2))****
>
>
> Michaël****
>
> Hi,****
>
> ** **
>
> Actually I thought that there would be no need to for parsing because the 
> method in the link seemed to support BBOX as it is. But perhaps it is not 
> native JTS method but some GeoTools method built upon it?****
>
> Another link from the same source:****
>
> http://docs.geotools.org/stable/javadocs/org/opengis/geometry/BoundingBox.html****
>
> ** **
>
> Parsing WMS BBOX to polygon should not be difficult for a programmer. This is 
> how I have been building WKT polygons with SQL after splitting BBOX 
> parameters into separate fields (xmin, ymin, xmax, ymax)****
>
> ** **
>
> select 'POLYGON (('||BBOX_XMIN || '  ' || BBOX_YMIN||','****
>
> ||BBOX_XMIN || '  ' || BBOX_YMAX||','****
>
> ||BBOX_XMAX || '  ' || BBOX_YMAX||','****
>
> ||BBOX_XMAX || '  ' || BBOX_YMIN||','****
>
> ||BBOX_XMIN || '  ' || BBOX_YMIN||'))'****
>
> from BBOX****
>
> ** **
>
> I have three other ideas for making the utility even more usable:****
>
> 1) X and Y in BBOX can mean easting and northing or vice versa depending on 
> the coordinate reference system. The utility could have a selection "Consider 
> that coordinates are in northing-easting order". The default should be 
> easting-northing.****
>
> 2) Find BBOX parameter from the long lines of the raw WMS server logs. One 
> line may look like****
>
> 127.0.0.1 - - [04/Sep/2009:11:22:19 +0300] "GET 
> /cgi-bin/mapserv.exe?map=c:\\ms4w\\osm.map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=783&HEIGHT=627&LAYERS=default&TRANSPARENT=TRUE&FORMAT=image%2Fpng&BBOX=3379680.3596462687,6672344.5722924275,3402683.352219573,6690764.593165304&SRS=epsg:2393&STYLES=
>  HTTP/1.1" 200 749141****
>
> 3) Parse also some other WMS parameters from the request and place them as 
> attributes of the OpenJUMP polygons in the result layer. Most useful would be 
> LAYERS, WIDTH and HEIGHT.****
>
> ** **
>
> Parameters in WMS request can be in any order. For recognizing them utility 
> should investige the parameter name (KEYWORD=) and remember, that parameter 
> value ends ends either to "&" craracter or to newline if it happens to be the 
> last one.****
>
> Just parsing text file with plain bounding boxes 
> BBOX=360736,7151616,373024,7163904 into polygons would immediately be an 
> useful tool for real world needs and such tool does not exist in any GIS 
> program I know. Thus it would match fine with OpenJUMP itself: lightweight, 
> clever and useful.****
>
> ** **
>
> -Jukka-****
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> ________________________________________****
>
> Lähettäjä: Landon Blake [sunburned.surve...@gmail.com]****
>
> Lähetetty: 17. tammikuuta 2013 18:25****
>
> Vastaanottaja: OpenJump develop and use****
>
> Aihe: Re: [JPP-Devel] How to convert WMS BBOX into polygon feature?****
>
> ** **
>
> Hmmmm. Should be too hard to process that. If we whip up a plug-in****
>
> that parses that data in a text file and adds an OJ layer, will that****
>
> work?****
>
> ** **
>
> Landon****
>
> ** **
>
> On Wed, Jan 16, 2013 at 6:57 AM, Rahkonen Jukka****
>
> <jukka.rahko...@mmmtike.fi> <jukka.rahko...@mmmtike.fi> wrote:****
>
>  Hi,****
>
> ** **
>
> Here comes a sample.****
>
> ** **
>
> -Jukka-****
>
> ** **
>
> Landon Blake wrote:****
>
>  ** **
>
> Jukka:****
>
> ** **
>
> Do you get the list of Bounding Boxes in a text file or similar format? Can 
> you****
>
> send me a sample.****
>
> ** **
>
> I may be able to help.****
>
> ** **
>
> Landon****
>
> ** **
>
> On Wed, Jan 16, 2013 at 2:46 AM, Rahkonen Jukka****
>
> <jukka.rahko...@mmmtike.fi> <jukka.rahko...@mmmtike.fi> wrote:****
>
>  Hi,****
>
> ** **
>
> I would like to do some analysis of  WMS server log by converting the****
>
>  recorded BBOX parameters (BBOX=360736,7151616,373024,7163904) into****
>
> polygons.  I guess it would be rather an easy task for an OJ programmer****
>
> because JTS has a function for that.****
>
>  ** **
>
> http://docs.geotools.org/stable/javadocs/org/geotools/geometry/jts/JTS****
>
> ** **
>
>  .html#toGeometry%28org.opengis.geometry.BoundingBox,%20com.vividsol****
>
> uti****
>
>  ons.jts.geom.GeometryFactory%29****
>
> ** **
>
> Do you agree?  Is anybody there willing to have a try with Beanshell or****
>
>  something?  I have managed to do the conversion with Spatialite and SQL 
> by****
>
> importing the BBOXes into database as a text file first I it would be a bit 
> faster****
>
> to use just OJ.****
>
>  ** **
>
> -Jukka Rahkonen-****
>
> ** **
>
> ----------------------------------------------------------------------****
>
> -------- Master Java SE, Java EE, Eclipse, Spring, Hibernate,****
>
> JavaScript, jQuery and much more. Keep your Java skills current with****
>
> LearnJavaNow -****
>
> 200+ hours of step-by-step video tutorials by Java experts.****
>
> SALE $49.99 this month only -- learn more at:****
>
> http://p.sf.net/sfu/learnmore_122612****
>
> _______________________________________________****
>
> Jump-pilot-devel mailing list****
>
> Jump-pilot-devel@lists.sourceforge.net****
>
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel****
>
>  ** **
>
> ------------------------------------------------------------------------------****
>
> Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery 
> and****
>
> much more. Keep your Java skills current with LearnJavaNow -****
>
> 200+ hours of step-by-step video tutorials by Java experts.****
>
> SALE $49.99 this month only -- learn more at:****
>
> http://p.sf.net/sfu/learnmore_122612****
>
> _______________________________________________****
>
> Jump-pilot-devel mailing list****
>
> Jump-pilot-devel@lists.sourceforge.net****
>
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel****
>
>  ** **
>
> ------------------------------------------------------------------------------****
>
> Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery****
>
> and much more. Keep your Java skills current with LearnJavaNow -****
>
> 200+ hours of step-by-step video tutorials by Java experts.****
>
> SALE $49.99 this month only -- learn more at:****
>
> http://p.sf.net/sfu/learnmore_122612****
>
> _______________________________________________****
>
> Jump-pilot-devel mailing list****
>
> Jump-pilot-devel@lists.sourceforge.net****
>
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel****
>
> ** **
>
>  ** **
>
> ------------------------------------------------------------------------------****
>
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,****
>
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current****
>
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft****
>
> MVPs and experts. ON SALE this month only -- learn more at:****
>
> http://p.sf.net/sfu/learnmore_122712****
>
> _______________________________________________****
>
> Jump-pilot-devel mailing list****
>
> Jump-pilot-devel@lists.sourceforge.net****
>
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel****
>
> ** **
>
> ------------------------------------------------------------------------------****
>
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,****
>
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current****
>
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft****
>
> MVPs and experts. ON SALE this month only -- learn more at:****
>
> http://p.sf.net/sfu/learnmore_122712****
>
> _______________________________________________****
>
> Jump-pilot-devel mailing list****
>
> Jump-pilot-devel@lists.sourceforge.net****
>
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel****
>
> ** **
>
> ** **
>
>  ** **
>
>
> ------------------------------------------------------------------------------
> Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
> much more. Get web development skills now with LearnDevNow -
> 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122812
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to