Re: [Geotools-devel] vector to raster to vector
A brief update for the list and Steve... I've proposed to merge the process module working branch into trunk. This will provide vector to raster conversion for users with the constraint that generated coverages have to fit into memory. I've begun building a disk-based tile cache for the jai-tools project. This will hold some number of tiles in memory with the remainder swapped to files. When this is working (fingers crossed) we can use it with both VectorToRasterProcess and RasterToVectorProcess. Simone: I think I can get the basic tile cache together but then I'll need help to add handling of concurrency. Michael -- ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] vector to raster to vector
Ciao Michael, please, see below --- Ing. Simone Giannecchini GeoSolutions S.A.S. Owner - Software Engineer Via Carignoni 51 55041 Camaiore (LU) Italy phone: +39 0584983027 fax: +39 0584983027 mob:+39 333 8128928 http://www.geo-solutions.it http://simboss.blogspot.com/ http://www.linkedin.com/in/simonegiannecchini --- On Wed, Jun 17, 2009 at 1:03 PM, Michael Bedwardmichael.bedw...@gmail.com wrote: I have finally got the vector to raster code into the process module. The new code is still on the 2.6.x_Process branch at the moment. The relevant package is here: http://svn.osgeo.org/geotools/branches/2.6.x_Process/modules/unsupported/process/src/main/java/org/geotools/process/raster/ Steve: you'll see that I've vandalized your code quite a bit. Apart from changes made to fit it into the process module I've also tried to do the following: - support the production of large coverages by using TiledImage rather than BufferedImage Mmmmhh, I am not sure that would make any difference, at least if you are planning on using the default TiledImage since it simply keep a hard reference to all its tiles, locking them in memory. If you want to support something different you'd need to implement a different thing, which would be able to swap tiles to disk. Anyway, nice work, as usual :-) Simone. - link the coverage data type to the type of the feature attribute used for values (presently int or float; other numeric types are coerced into one of these and a warning is logged) If you get the chance to look at it please let me know about any glaring errors, gaps etc. There is just one very basic unit test at the moment. I'll add more over the next few days. Michael -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] vector to raster to vector
Hi Simone Mmmmhh, I am not sure that would make any difference, at least if you are planning on using the default TiledImage since it simply keep a hard reference to all its tiles, locking them in memory. If you want to support something different you'd need to implement a different thing, which would be able to swap tiles to disk. Sigh... of course :-( sound of slapping forehead I guess I'm right in thinking that the JAI folk never got round to disk-based tile caching ? I see in this discussion it's suggested to handle this by sub-classing TiledImage... http://forums.java.net/jive/thread.jspa?messageID=343995 ...and this sounds easier than implementing a custom TileCache class. What approach have you used in your own work ? cheers Michael -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] vector to raster to vector
I know at least one implementation of FileBasedTileCache, I need to clarify a bit the licensing issues. If you are interested I can purse that. Otherwise we can build our own. Simone. --- Ing. Simone Giannecchini GeoSolutions S.A.S. Owner - Software Engineer Via Carignoni 51 55041 Camaiore (LU) Italy phone: +39 0584983027 fax: +39 0584983027 mob:+39 333 8128928 http://www.geo-solutions.it http://simboss.blogspot.com/ http://www.linkedin.com/in/simonegiannecchini --- On Thu, Jun 18, 2009 at 10:48 AM, Michael Bedwardmichael.bedw...@gmail.com wrote: Hi Simone Mmmmhh, I am not sure that would make any difference, at least if you are planning on using the default TiledImage since it simply keep a hard reference to all its tiles, locking them in memory. If you want to support something different you'd need to implement a different thing, which would be able to swap tiles to disk. Sigh... of course :-( sound of slapping forehead I guess I'm right in thinking that the JAI folk never got round to disk-based tile caching ? I see in this discussion it's suggested to handle this by sub-classing TiledImage... http://forums.java.net/jive/thread.jspa?messageID=343995 ...and this sounds easier than implementing a custom TileCache class. What approach have you used in your own work ? cheers Michael -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] vector to raster to vector
Would that be the one in this project ? http://code.google.com/p/mobile-trail-explorer/ If so it's GPL. But a quick look at the code there suggests it's not a big job to make such a class from scratch. Perhaps a DiskTileCache class for jai-tools class :-) Michael -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] vector to raster to vector
I have finally got the vector to raster code into the process module. The new code is still on the 2.6.x_Process branch at the moment. The relevant package is here: http://svn.osgeo.org/geotools/branches/2.6.x_Process/modules/unsupported/process/src/main/java/org/geotools/process/raster/ Steve: you'll see that I've vandalized your code quite a bit. Apart from changes made to fit it into the process module I've also tried to do the following: - support the production of large coverages by using TiledImage rather than BufferedImage - link the coverage data type to the type of the feature attribute used for values (presently int or float; other numeric types are coerced into one of these and a warning is logged) If you get the chance to look at it please let me know about any glaring errors, gaps etc. There is just one very basic unit test at the moment. I'll add more over the next few days. Michael -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] vector to raster to vector
That sounds fine; Michael when you add this code to the module can you make a note of the pulic domain code in the review atp document? Jody On Wed, May 27, 2009 at 5:48 AM, Steve Ansari steve.ans...@noaa.gov wrote: Hi Michael, I had to run this through the NOAA channels and there was some simplification requested, but overall the code submission and integration is fine. Here is the recommended header: /* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2005-2008, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ /* *NOTICE REGARDING STATUS AS PUBLIC DOMAIN WORK AND ABSENCE OF ANY WARRANTIES * *The work (source code) was prepared by an officer or employee of the *United States Government as part of that person's official duties, thus *it is a work of the U.S. Government, which is in the public domain and *not elegible for copyright protection. See, 17 U.S.C. § 105. No warranty *of any kind is given regarding the work. */ Sound ok? Thanks, Steve Michael Bedward said the following on 5/22/2009 2:52 AM: Super, thanks Jody. Steve - let me know if that's ok with you and, if it is, I'll move your code into the library and let the users know about it. cheers Michael 2009/5/22 Jody Garnett jody.garn...@gmail.com: Hi Michael: We encountered this before; with respect to the contributions of Bryce. Here is what we came up with: - Public domain contributions (ie gov employees) individual code: can sign w/ no conflict as themselves gov code: already public domain - OSGeo does not need a license treat on a case by case basis Just like some of the files credit (c) Refractions in the header (for my earlier work); the files Bryce worked on have the following (Example from GeoTiffException): /* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2005-2008, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ /* * NOTICE OF RELEASE TO THE PUBLIC DOMAIN * * This work was created by employees of the USDA Forest Service's * Fire Science Lab for internal use. It is therefore ineligible for * copyright under title 17, section 105 of the United States Code. You * may treat it as you would treat any public domain work: it may be used, * changed, copied, or redistributed, with or without permission of the * authors, for free or for compensation. You may not claim exclusive * ownership of this code because it is already owned by everyone. Use this * software entirely at your own risk. No warranty of any kind is given. * * A copy of 17-USC-105 should have accompanied this distribution in the file * 17USC105.html. If not, you may access the law via the US Government's * public websites: * - http://www.copyright.gov/title17/92chap1.html#105 * - http://www.gpoaccess.gov/uscode/ (enter 17USC105 in the search box.) */ -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] vector to raster to vector
2009/5/27 Jody Garnett jody.garn...@gmail.com: That sounds fine; Michael when you add this code to the module can you make a note of the pulic domain code in the review atp document? Yep - no worries Jody. Thanks very much for the legwork Steve - it'll will be great to have your code in the library. I'll send you the details of when it's in. Michael -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] vector to raster to vector
Hello folks, Somewhere back in this thread I mentioned contacting Steve Ansari about some nice vector to raster code that he posted on the user list last year. Steve is happy for this code to go into the library (Jody suggested it join the raster to vector code in the process module) so I pointed him to the contributor's agreement. I've just heard back from Steve and, as a US Govt employee, he feels that he can't proceed with the agreement. Apparently, his employer views the code as being in the public domain so it's fine for us to use it but not possible for him to sign over intellectual property (I'm cc-ing this to Steve and he can correct me if I've mangled that). Steve wondered if I could take ownership of the code to get around this, while he could still field queries about it and (I hope) benefit from any improvements that we come up with. Is that kosher ? Any other suggestions ? cheers Michael -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://www.creativitycat.com ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] vector to raster to vector
Super, thanks Jody. Steve - let me know if that's ok with you and, if it is, I'll move your code into the library and let the users know about it. cheers Michael 2009/5/22 Jody Garnett jody.garn...@gmail.com: Hi Michael: We encountered this before; with respect to the contributions of Bryce. Here is what we came up with: - Public domain contributions (ie gov employees) individual code: can sign w/ no conflict as themselves gov code: already public domain - OSGeo does not need a license treat on a case by case basis Just like some of the files credit (c) Refractions in the header (for my earlier work); the files Bryce worked on have the following (Example from GeoTiffException): /* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2005-2008, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ /* * NOTICE OF RELEASE TO THE PUBLIC DOMAIN * * This work was created by employees of the USDA Forest Service's * Fire Science Lab for internal use. It is therefore ineligible for * copyright under title 17, section 105 of the United States Code. You * may treat it as you would treat any public domain work: it may be used, * changed, copied, or redistributed, with or without permission of the * authors, for free or for compensation. You may not claim exclusive * ownership of this code because it is already owned by everyone. Use this * software entirely at your own risk. No warranty of any kind is given. * * A copy of 17-USC-105 should have accompanied this distribution in the file * 17USC105.html. If not, you may access the law via the US Government's * public websites: * - http://www.copyright.gov/title17/92chap1.html#105 * - http://www.gpoaccess.gov/uscode/ (enter 17USC105 in the search box.) */ -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://www.creativitycat.com ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] vector to raster to vector
Yes, I guess was thinking of something similar to the DataUtilities class but I'm fine about doing it another way - whatever works best is best. Regarding the process module - yes, it is cumbersome for hands on use. I must admit that I've bypassed it when I've used the raster to vector function in my own code, and the trouble with that for the general community is that it's akin to secret knowledge. Are you thinking of something specific when you say make the code more useful where it is ? Michael -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] vector to raster to vector
Yes I am ... I think we proposed a naming convention right from the get go. By convention we could make the process available using a static method to help with test cases and direct from Java use. // how about this? features = RasterToVector.process(raster, band, outsideValues, monitor); Nice :) Steve is happy for his vector to raster code to be included. Does he have to do the contributor agreement thing ? Michael PS. I put some spline generating code in the users guide page on creating curves a while ago. That might fit nicely in process too. -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] vector to raster to vector
Can we make the code more useful where it is? In the process module The process interface is useful for advertising functionality to dynamic applications; but not so friendly for hands on java hacking. For a utility class there are actually a couple of ways to do it; would you want to just add a static method to the code that implements the process? Or are you thinking something similar to the CRS and JTS and DataUtilities utility classes? Jody On Wed, Mar 18, 2009 at 12:19 PM, Michael Bedward michael.bedw...@gmail.com wrote: Dear all, A proposal for a small unsupported module... I've been chatting to Steve Ansari who posted some nice code for vector to raster conversion to the users list last year. I suggested to Steve that this could be bundled together with some code that I wrote for raster to vector conversion which, at present, is a bit hidden in the Process module. With the addition of a few helper / utility classes I thought this could be a useful module. What do others think ? cheers Michael -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel