[JPP-Devel] Spatialite multigeometry trouble and JTS v. 1.13
Hi, While testing the new 0.8.1 version of DB Query Plugin I noticed that I could not read any multigeometries nor geometry collections from Spatialite. Further research revealed that with a bit older OpenJUMP versions there are no troubles at all with these geometries. For example OJ r3131 from 2012-12-12 works fine for me. The error with recent OJ versions is Unknown WKB type 0. running query: select * from multipolygons Warning: Unable to find FDO-OGR metadata: [SQLITE_ERROR] SQL error or missing database (no such col umn: geometry_format). I'll take this as an indication that this database doesn't conform to FDO RF C 16, but is just a regular spatialite (or sqlite) database java.sql.SQLException: Unknown WKB type 0 at org.freevoice.jumpdbqueryextension.spatialite.JumpSpatialiteDbQuery.getAttributeValueFrom Results(JumpSpatialiteDbQuery.java:455) at org.freevoice.jumpdbqueryextension.AbstractJumpDbQuery.addFeatureToCollection(AbstractJum pDbQuery.java:132) at org.freevoice.jumpdbqueryextension.spatialite.JumpSpatialiteDbQuery.getCollection(JumpSpa tialiteDbQuery.java:404) at org.freevoice.jumpdbqueryextension.JumpDbQueryPlugin.run(JumpDbQueryPlugin.java:169) at java.lang.Thread.run(Unknown Source) I made a little test Spatialite v.3 database which contains points, linestrings, multilinestrings, polygons, multipolygons and geometry collections with 10 features on each layer to test with http://latuviitta.org/documents/Geometry_type_test.sqlite If I could I would have a look at changeset 3137: update jts library to 1.13 -Jukka Rahkonen -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Colourtheming problems / svg export
Dear Michael I think all that can be reasonably done is to provide the SVG with as many decimal places as practical so that any viewer-scaling does not lose resolution. Then, for the user, it will be necessary to figure out the appropriate image size to produce a required scale. Geoff. On 7/04/2013 4:41 PM, Michaël Michaud wrote: Hi Geoffrey, As far as I know SVG images are vector graphics so therefore are not at a scale and hence resolution is not an issue. You are right, this should only be a printing problem. However, in OpenJUMP, rendering process uses screen coordinates, and it may make things difficult for the end user to know how to print at a desired scale. As far as I understood (I'm not a printing nor an svg expert), rendering svg with openjump uses a Batik routines which print vectors to the screen Coordinate system rather than to the original Coordinate system (can probably be changed, did not try this way). After that, Inkscape uses a default setting making it easy to transform pixel coordinates to paper coordinates (change pixels to millimeters using a default 90 ppi resolution). As I explain it, I think that it would be a better approach to apply an affine transform before rendering svg, to print it directly in millimeters at the desired scale (I suppose units can be set in a svg document), but I don't know what is possible to do with batik. The appearance of the image depends on the viewer chosen and such any scaling is done at the viewer end. As you point out there may have been some rounding at the creation stage, but after that it is up to he viewer to produce the image at the required size. This was the point I tried to make to Andrei. About rounding : the issue is related to the fact that the Svg routine uses the same graphic pipeline as the one to print to screen (which includes a decimator to make things faster). The decimator rounds coordinates to 1/2 pixel, and for svg, I changed this value to 0.001, but it may have been a better idea to scale the whole svg rendering process to have real world coordinates or millimeters coordinates at the desired scale (maybe your approach in Printer PlugIn) Hope this makes sense, Michaël Am I correct? Geoff On 6/04/2013 5:21 PM, Michaël Michaud wrote: Hi Geoff, Thank you for the improvement, I'll include 1.85 for OpenJUMP 1.6 release. On another topic, I don't know if you followed the topic on SVG export. Andrei Nacu made some tests on svg printing with OpenJUMP Core and with Jump printer There were problems with the output resolution and with the output scale I could solve some problems for OpenJUMP core svg export (I temporarily change the output resolution and the decimation parameter) : http://jump-pilot.svn.sourceforge.net/viewvc/jump-pilot/core/trunk/src/org/openjump/core/ui/plugin/file/SaveImageAsSVGPlugIn.java?view=logpathrev=3420 According to Andrei, scale problem also exist in JumpPrinter (and maybe the resolution problem too) : http://www.mail-archive.com/jump-pilot-devel@lists.sourceforge.net/msg13031.html http://www.mail-archive.com/search?l=jump-pilot-devel@lists.sourceforge.netq=subject:%22Re%3A+[JPP-Devel]+Screen+Scale+and+SVG+Output+Scale%22 Michaël Dear All Re: Printer Plugin I have found the problem with the colour patches in the Layer Legend when colour themeing is used, but not the reasons why it has occurred. I have posted an updated JumpPrinter.jar that will now always solid fill the colour patches in the LayerLegend. I am not sure why I had orginally allowed for a pattern fill, as if themeing is used then the fill might be expected to be a solid fill. For some reason (which I don't fully understand) the themeStyle.getAttributeValueToBasicStyleMap(); seems to return a hatched pattern (WKT type) from a layer with a themeing style. I am not sure whether this has occurred with a recent release (I am currently using 1.5.2) or whether it has always been a bug and just not reported/identified. It also occurs after the Properties dialog has been used for the first time. Please report any other bugs. Geoff On 4/04/2013 3:59 PM, Arnd Kielhorn wrote: Hello Michael, as You can see in the legend symbols within the screenshots from Emil there are some some symbol having a hachure and some not. But I am sure that the legend in the laer panel have not any hachure style. I often have this problem. Arnd Hi, Hello Emil, You can edit the minimum and maximum values and the labels in the table of color theming dialog. After that You choose the right mouse click on the layer in the right layer panel, choose copy style and than select the other layer which You want to style in the same scheme and make again a right mouse click on the layer and choose paste style. When You always work in project You do not loose Your style and You can copy and paste styles between different openend projects. Good tip Arnd,
[JPP-Devel] The new geometry is invalid. Cancelled.
Hi, I get the error: The new geometry is invalid. Cancelled. and I am not shure whether this error is correct. 1. Switch Snap to vertices option. 2. Draw a rectangle. 3. Draw a second rectangle with two identical vertices from the first rectangle (with snap). 4. Select the two rectangles and Combine Selected features 5. Try to move this multipolygon with Move Selected Items Tool. 6. The error appears The new geometry is invalid. Cancelled. 7. The QAValidate Selected Layers... causes a self-intersection in *one* point. Is this a bug in OJ (a precision-problem) or is the new geometry really invalide? Uwe -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] The new geometry is invalid. Cancelled.
Hi, I followed the steps and after the Combine selected features I had this multipolygon MULTIPOLYGON ((( 80 125, 80 241, 175 241, 175 125, 80 125 )), (( 175 125, 175 241, 263 241, 263 125, 175 125 ))) It cannot be added as WKT either. -Jukka- -Alkuperäinen viesti- Lähettäjä: Uwe Dalluege [mailto:uwe.dallu...@hcu-hamburg.de] Lähetetty: 8. huhtikuuta 2013 13:06 Vastaanottaja: Devel Jump Aihe: [JPP-Devel] The new geometry is invalid. Cancelled. Hi, I get the error: The new geometry is invalid. Cancelled. and I am not shure whether this error is correct. 1. Switch Snap to vertices option. 2. Draw a rectangle. 3. Draw a second rectangle with two identical vertices from the first rectangle (with snap). 4. Select the two rectangles and Combine Selected features 5. Try to move this multipolygon with Move Selected Items Tool. 6. The error appears The new geometry is invalid. Cancelled. 7. The QAValidate Selected Layers... causes a self-intersection in *one* point. Is this a bug in OJ (a precision-problem) or is the new geometry really invalide? Uwe -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] The new geometry is invalid. Cancelled.
Hi, if you put a third geometrie to the two polygons, for instance a linestring, and combine them you will receive a geometrycollection and not a multipolygon. The geometrycollection causes *no* errors but the multipolygon. Uwe Am 08.04.2013 12:05, schrieb Uwe Dalluege: Hi, I get the error: The new geometry is invalid. Cancelled. and I am not shure whether this error is correct. 1. Switch Snap to vertices option. 2. Draw a rectangle. 3. Draw a second rectangle with two identical vertices from the first rectangle (with snap). 4. Select the two rectangles and Combine Selected features 5. Try to move this multipolygon with Move Selected Items Tool. 6. The error appears The new geometry is invalid. Cancelled. 7. The QAValidate Selected Layers... causes a self-intersection in *one* point. Is this a bug in OJ (a precision-problem) or is the new geometry really invalide? Uwe -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Enhancing DB Query Plugin with Spatialite functions.
On 08.04.2013 07:07, Rahkonen Jukka wrote: edgar soldin wrote: On 07.04.2013 22:34, Rahkonen Jukka wrote: SNIP I did my test with this package I gathered a few weeks ago http://latuviitta.org/documents/Spatialite_4.0_test_with_jre_1.6.zip This version is very feature rich and it has lots of dependies and therefore the zip contains 10 dll files. Unzip the 10 dll files into the lib\ext folder together with the DB Query Plugin 0.8.1 and you are ready to go. SNIP There is some inconvenience in putting all the 10 dll files into lib\ext because they are so many. However, I could not find a simple way to make OJ to find to dll files is I placed them into lib\ext\Spatialite_dll. can you try to use the appropriate place, which is the subfolder in lib/native? I made a few trials by placing all dlls in lib/native and in lib/native/xp but they have not been successful yet. hmm maybe it is hacked that way.. would have to have a look the plugin source. on the first look you have to give a path to the dll, so it actually should not matter as long as all dlls end up in the same folder. in theory. do you have the set of libs for other os as well? where does it stem from? MS Windows binaries are from the official Spatialite site http://www.gaia-gis.it/gaia-sins/ Unfortunately these DLLs are missing an essential SQLite library, and the main dll is compiled so that SQLite library must have a non-standard name libsqlite3-0.dll. I could made the dll package to work by renaming sqlite3.dll which was downloaded with the GDAL from http://gisinternals.com/sdk/ but it was not just to take the first sqlite3.dll and rename it to libsqlite3-0.dll. I had to try with several files and check the main libspatialite-4.dll with Dependency walker program before all missing dependencies were gone. This is too complicated for a regular user and therefore we should either deliver a tested set of dlls or point a stable and reliable links for downloading such a set. ok, this sounds too difficult for a last minute inclusion. but we can start on integrating over the course of the next months. can you give me a data test set and/or step by step instructions how it is supposed to work? spatiallite input and spatiallite functions, which seems to be something different? i would set up the JumpDBQ sources the in an extra project and see if we can enhance usability by delivering/packaging native libraries for install easiness. @Larry Reeder: would you be willing to accept patches for your plugin? ..ede -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Enhancing DB Query Plugin with Spatialite functions.
edgar Soldin wrote: ok, this sounds too difficult for a last minute inclusion. but we can start on integrating over the course of the next months. can you give me a data test set and/or step by step instructions how it is supposed to work? spatiallite input and spatiallite functions, which seems to be something different? I can make a test database for you from the OpenStreetMap data. What part of Germany would you like to play with? Select from here http://download.geofabrik.de/europe/germany.html -Jukka- -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] The new geometry is invalid. Cancelled.
Hi, so - well the situation is not so nice, as it should be valid. However, the JTS TestBuilder says the Multi-Polgyon is invalid because of Self-intersection at or near point (175.0, 125.0, NaN) Same message appears when you try to add it as a new feature. maybe you can make it valid before by running a zero-buffer over it? stefan Am 08.04.13 07:30, schrieb Uwe Dalluege: Hi, if you put a third geometrie to the two polygons, for instance a linestring, and combine them you will receive a geometrycollection and not a multipolygon. The geometrycollection causes *no* errors but the multipolygon. Uwe Am 08.04.2013 12:05, schrieb Uwe Dalluege: Hi, I get the error: The new geometry is invalid. Cancelled. and I am not shure whether this error is correct. 1. Switch Snap to vertices option. 2. Draw a rectangle. 3. Draw a second rectangle with two identical vertices from the first rectangle (with snap). 4. Select the two rectangles and Combine Selected features 5. Try to move this multipolygon with Move Selected Items Tool. 6. The error appears The new geometry is invalid. Cancelled. 7. The QAValidate Selected Layers... causes a self-intersection in *one* point. Is this a bug in OJ (a precision-problem) or is the new geometry really invalide? Uwe -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] The new geometry is invalid. Cancelled.
Hi Stefan, I am afraid I do not understand :-( Do you think this is a bug in OJ? The multipolygon causes an error the geometrycollection not. Is this behaviour OGC-conform (simpel features...)? What do you think? uwe Am 08.04.2013 16:36, schrieb Stefan Steiniger: Hi, so - well the situation is not so nice, as it should be valid. However, the JTS TestBuilder says the Multi-Polgyon is invalid because of Self-intersection at or near point (175.0, 125.0, NaN) Same message appears when you try to add it as a new feature. maybe you can make it valid before by running a zero-buffer over it? stefan Am 08.04.13 07:30, schrieb Uwe Dalluege: Hi, if you put a third geometrie to the two polygons, for instance a linestring, and combine them you will receive a geometrycollection and not a multipolygon. The geometrycollection causes *no* errors but the multipolygon. Uwe Am 08.04.2013 12:05, schrieb Uwe Dalluege: Hi, I get the error: The new geometry is invalid. Cancelled. and I am not shure whether this error is correct. 1. Switch Snap to vertices option. 2. Draw a rectangle. 3. Draw a second rectangle with two identical vertices from the first rectangle (with snap). 4. Select the two rectangles and Combine Selected features 5. Try to move this multipolygon with Move Selected Items Tool. 6. The error appears The new geometry is invalid. Cancelled. 7. The QAValidate Selected Layers... causes a self-intersection in *one* point. Is this a bug in OJ (a precision-problem) or is the new geometry really invalide? Uwe -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] The new geometry is invalid. Cancelled.
Hi Uwe, I am not sure I would call it a bug. OJ, should (try to) create data that are OGC conform, but in this case it doesn't. Which means, the case needs special treatment, but this is not implemented. That the multi-polygon causes an error is with the OGS SF specification = correct. However, that the geometry collection does not cause an error should be correct aw well, because there is, I believe, nothing said about geometry collections and their validity. Geometry collections should be allowed to have any type of geometries in what ever way they are drawn - like a container. If we would check geometry collections for their validity it may be that people cannot store anymore the data they have. Hence, checking should be optional. But I guess here, Michael M. knows probably more about OGC conformance? I'll also cc to JTS list. cheers, stefan PS: the Multi-polygon: MULTIPOLYGON ((( 80 125, 80 241, 175 241, 175 125, 80 125 )), (( 175 125, 175 241, 263 241, 263 125, 175 125 ))) Am 08.04.13 09:48, schrieb Uwe Dalluege: Hi Stefan, I am afraid I do not understand :-( Do you think this is a bug in OJ? The multipolygon causes an error the geometrycollection not. Is this behaviour OGC-conform (simpel features...)? What do you think? uwe Am 08.04.2013 16:36, schrieb Stefan Steiniger: Hi, so - well the situation is not so nice, as it should be valid. However, the JTS TestBuilder says the Multi-Polgyon is invalid because of Self-intersection at or near point (175.0, 125.0, NaN) Same message appears when you try to add it as a new feature. maybe you can make it valid before by running a zero-buffer over it? stefan Am 08.04.13 07:30, schrieb Uwe Dalluege: Hi, if you put a third geometrie to the two polygons, for instance a linestring, and combine them you will receive a geometrycollection and not a multipolygon. The geometrycollection causes *no* errors but the multipolygon. Uwe Am 08.04.2013 12:05, schrieb Uwe Dalluege: Hi, I get the error: The new geometry is invalid. Cancelled. and I am not shure whether this error is correct. 1. Switch Snap to vertices option. 2. Draw a rectangle. 3. Draw a second rectangle with two identical vertices from the first rectangle (with snap). 4. Select the two rectangles and Combine Selected features 5. Try to move this multipolygon with Move Selected Items Tool. 6. The error appears The new geometry is invalid. Cancelled. 7. The QAValidate Selected Layers... causes a self-intersection in *one* point. Is this a bug in OJ (a precision-problem) or is the new geometry really invalide? Uwe -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Enhancing DB Query Plugin with Spatialite functions.
Hi, Well, I made a test database from Hamburg and wrote a short manual about installing and testing http://latuviitta.org/documents/OpenJUMP_Spatialite_test_manual.pdf -Jukka- Jukka Rahkonen wrote: edgar Soldin wrote: ok, this sounds too difficult for a last minute inclusion. but we can start on integrating over the course of the next months. can you give me a data test set and/or step by step instructions how it is supposed to work? spatiallite input and spatiallite functions, which seems to be something different? I can make a test database for you from the OpenStreetMap data. What part of Germany would you like to play with? Select from here http://download.geofabrik.de/europe/germany.html -Jukka- -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Enhancing DB Query Plugin with Spatialite functions.
well, done.. thanks. will definitely put that into my queue! one question still: do i understand correctly that spatiallite extensions will pretty much work with any database connection? e.g. postgis, mysql as well? ..ede On 08.04.2013 16:38, Rahkonen Jukka wrote: Hi, Well, I made a test database from Hamburg and wrote a short manual about installing and testing http://latuviitta.org/documents/OpenJUMP_Spatialite_test_manual.pdf -Jukka- Jukka Rahkonen wrote: edgar Soldin wrote: ok, this sounds too difficult for a last minute inclusion. but we can start on integrating over the course of the next months. can you give me a data test set and/or step by step instructions how it is supposed to work? spatiallite input and spatiallite functions, which seems to be something different? I can make a test database for you from the OpenStreetMap data. What part of Germany would you like to play with? Select from here http://download.geofabrik.de/europe/germany.html -Jukka- -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Enhancing DB Query Plugin with Spatialite functions.
Hi, Not really, Spatialite is a spatial extension for SQLite database engine and it does not work with other databases. However, this is not the whole truth and it is indeed possible to use SQLite and Spatialite functions for handling external data that is not stored into the SQLite data file at all. SQLite has some magic system called virtual table which makes it possible to connect a CSV file or Excel spreadsheet virtually from SQLite database without importing data. When this connection is made it is possible to do SQL queries agains the native files as they were real database tables. Of course this connection is not optimal when it comes to speed. GDAL can also utilise SQLite and Spatialite as a database engine. For example, it is possible to do a spatial query against a shapefile (or any other format which is supported by GDAL/OGR) as in this example from the document http://www.gdal.org/ogr/ogr_sql_sqlite.html SELECT EAS_ID, ST_Area(GEOMETRY) AS area FROM poly WHERE ST_Intersects(GEOMETRY, BuildCircleMbr(479750.6875,4764702.0,100)) I don't know how easy or difficult it would be to utilise those advanced features and tricks from Java and OpenJUMP. However, there are many interesting things to do with plain SQL by considering Spatialite just as a zero-configuration relational database http://sqlite.org/zeroconf.html -Jukka. Lähettäjä: edgar.sol...@web.de [edgar.sol...@web.de] Lähetetty: 8. huhtikuuta 2013 17:59 Vastaanottaja: OpenJump develop and use Aihe: Re: [JPP-Devel] Enhancing DB Query Plugin with Spatialite functions. well, done.. thanks. will definitely put that into my queue! one question still: do i understand correctly that spatiallite extensions will pretty much work with any database connection? e.g. postgis, mysql as well? ..ede On 08.04.2013 16:38, Rahkonen Jukka wrote: Hi, Well, I made a test database from Hamburg and wrote a short manual about installing and testing http://latuviitta.org/documents/OpenJUMP_Spatialite_test_manual.pdf -Jukka- Jukka Rahkonen wrote: edgar Soldin wrote: ok, this sounds too difficult for a last minute inclusion. but we can start on integrating over the course of the next months. can you give me a data test set and/or step by step instructions how it is supposed to work? spatiallite input and spatiallite functions, which seems to be something different? I can make a test database for you from the OpenStreetMap data. What part of Germany would you like to play with? Select from here http://download.geofabrik.de/europe/germany.html -Jukka- -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] The new geometry is invalid. Cancelled.
Hi Uwe, Stefan, OpenJUMP (JTS) is right, this MultiPolygon is not OGC conform Here is the citation : Multipolygon 2. The Boundaries of any 2 Polygons that are elements of a MultiPolygon may not ‘cross’ and may touch at only a finite number of points. (Note that crossing is prevented by assertion 1 above). Don't ask me why, I've always thought it is strange that lines can share their boundaries in a MultiLineString and polygons cannot share an edge in a MultiPolygon, but it's a well established rule that JTS follows. Michaël Hi Uwe, I am not sure I would call it a bug. OJ, should (try to) create data that are OGC conform, but in this case it doesn't. Which means, the case needs special treatment, but this is not implemented. That the multi-polygon causes an error is with the OGS SF specification = correct. However, that the geometry collection does not cause an error should be correct aw well, because there is, I believe, nothing said about geometry collections and their validity. Geometry collections should be allowed to have any type of geometries in what ever way they are drawn - like a container. If we would check geometry collections for their validity it may be that people cannot store anymore the data they have. Hence, checking should be optional. But I guess here, Michael M. knows probably more about OGC conformance? I'll also cc to JTS list. cheers, stefan PS: the Multi-polygon: MULTIPOLYGON ((( 80 125, 80 241, 175 241, 175 125, 80 125 )), (( 175 125, 175 241, 263 241, 263 125, 175 125 ))) Am 08.04.13 09:48, schrieb Uwe Dalluege: Hi Stefan, I am afraid I do not understand :-( Do you think this is a bug in OJ? The multipolygon causes an error the geometrycollection not. Is this behaviour OGC-conform (simpel features...)? What do you think? uwe Am 08.04.2013 16:36, schrieb Stefan Steiniger: Hi, so - well the situation is not so nice, as it should be valid. However, the JTS TestBuilder says the Multi-Polgyon is invalid because of Self-intersection at or near point (175.0, 125.0, NaN) Same message appears when you try to add it as a new feature. maybe you can make it valid before by running a zero-buffer over it? stefan Am 08.04.13 07:30, schrieb Uwe Dalluege: Hi, if you put a third geometrie to the two polygons, for instance a linestring, and combine them you will receive a geometrycollection and not a multipolygon. The geometrycollection causes *no* errors but the multipolygon. Uwe Am 08.04.2013 12:05, schrieb Uwe Dalluege: Hi, I get the error: The new geometry is invalid. Cancelled. and I am not shure whether this error is correct. 1. Switch Snap to vertices option. 2. Draw a rectangle. 3. Draw a second rectangle with two identical vertices from the first rectangle (with snap). 4. Select the two rectangles and Combine Selected features 5. Try to move this multipolygon with Move Selected Items Tool. 6. The error appears The new geometry is invalid. Cancelled. 7. The QAValidate Selected Layers... causes a self-intersection in *one* point. Is this a bug in OJ (a precision-problem) or is the new geometry really invalide? Uwe -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Enhancing DB Query Plugin with Spatialite functions.
Hi, Just a side note about OpenJUMP + personnal database : I'm sure that SQLite database has great qualities and can add great capabilities to OpenJUMP, but I've always been reluctant to introduce dll into OpenJUMP distribution (difficulty to keep it multiplatform, lack of visibility on C code due to my ignorance, code duplication to achieve the same goal like JTS/Geos in this case...) For these reasons, good or bad, I'd be much more enthousiast to integrate java projects like h2 database (a small java database which can be used both as an embeded database or as a server), hatbox (a spatial index for h2 which works a bit like the one of spatialite (as far as I know), Jaspa (a project adding to all ST_xxx geometry functions to h2). Unfortunately, there is still some work to integrate such projects into OpenJUMP and my time and my skill are too limited for that. Just wanted to share this thought, but I admit that Spatialite is a mature project which can add nice capabilities with a smaller effort. My 2 cents, Michaël Hi, Not really, Spatialite is a spatial extension for SQLite database engine and it does not work with other databases. However, this is not the whole truth and it is indeed possible to use SQLite and Spatialite functions for handling external data that is not stored into the SQLite data file at all. SQLite has some magic system called virtual table which makes it possible to connect a CSV file or Excel spreadsheet virtually from SQLite database without importing data. When this connection is made it is possible to do SQL queries agains the native files as they were real database tables. Of course this connection is not optimal when it comes to speed. GDAL can also utilise SQLite and Spatialite as a database engine. For example, it is possible to do a spatial query against a shapefile (or any other format which is supported by GDAL/OGR) as in this example from the document http://www.gdal.org/ogr/ogr_sql_sqlite.html SELECT EAS_ID, ST_Area(GEOMETRY) AS area FROM poly WHERE ST_Intersects(GEOMETRY, BuildCircleMbr(479750.6875,4764702.0,100)) I don't know how easy or difficult it would be to utilise those advanced features and tricks from Java and OpenJUMP. However, there are many interesting things to do with plain SQL by considering Spatialite just as a zero-configuration relational database http://sqlite.org/zeroconf.html -Jukka. Lähettäjä: edgar.sol...@web.de [edgar.sol...@web.de] Lähetetty: 8. huhtikuuta 2013 17:59 Vastaanottaja: OpenJump develop and use Aihe: Re: [JPP-Devel] Enhancing DB Query Plugin with Spatialite functions. well, done.. thanks. will definitely put that into my queue! one question still: do i understand correctly that spatiallite extensions will pretty much work with any database connection? e.g. postgis, mysql as well? ..ede On 08.04.2013 16:38, Rahkonen Jukka wrote: Hi, Well, I made a test database from Hamburg and wrote a short manual about installing and testing http://latuviitta.org/documents/OpenJUMP_Spatialite_test_manual.pdf -Jukka- Jukka Rahkonen wrote: edgar Soldin wrote: ok, this sounds too difficult for a last minute inclusion. but we can start on integrating over the course of the next months. can you give me a data test set and/or step by step instructions how it is supposed to work? spatiallite input and spatiallite functions, which seems to be something different? I can make a test database for you from the OpenStreetMap data. What part of Germany would you like to play with? Select from here http://download.geofabrik.de/europe/germany.html -Jukka- -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented
Re: [JPP-Devel] Enhancing DB Query Plugin with Spatialite functions.
Hmm, after re-thinking, the GDAL version 1.10 can also be loaded as SQLite extension http://www.gdal.org/ogr/drv_sqlite.html It means that Spatialite can be made to read anything that GDAL/OGR can read, and if OpenJUMP can read Spatialite then it can read all the GDAL/OGR formats at the same and Spatialite queries could be used with all data sources. I remember that I tried to test that some time ago but unfortunately I could not make my way through the dll jungle. -Jukka- Rahkonen Jukka wrote: Hi, Not really, Spatialite is a spatial extension for SQLite database engine and it does not work with other databases. However, this is not the whole truth and it is indeed possible to use SQLite and Spatialite functions for handling external data that is not stored into the SQLite data file at all. SQLite has some magic system called virtual table which makes it possible to connect a CSV file or Excel spreadsheet virtually from SQLite database without importing data. When this connection is made it is possible to do SQL queries agains the native files as they were real database tables. Of course this connection is not optimal when it comes to speed. GDAL can also utilise SQLite and Spatialite as a database engine. For example, it is possible to do a spatial query against a shapefile (or any other format which is supported by GDAL/OGR) as in this example from the document http://www.gdal.org/ogr/ogr_sql_sqlite.html SELECT EAS_ID, ST_Area(GEOMETRY) AS area FROM poly WHERE ST_Intersects(GEOMETRY, BuildCircleMbr(479750.6875,4764702.0,100)) I don't know how easy or difficult it would be to utilise those advanced features and tricks from Java and OpenJUMP. However, there are many interesting things to do with plain SQL by considering Spatialite just as a zero-configuration relational database http://sqlite.org/zeroconf.html -Jukka. Lähettäjä: edgar.sol...@web.de [edgar.sol...@web.de] Lähetetty: 8. huhtikuuta 2013 17:59 Vastaanottaja: OpenJump develop and use Aihe: Re: [JPP-Devel] Enhancing DB Query Plugin with Spatialite functions. well, done.. thanks. will definitely put that into my queue! one question still: do i understand correctly that spatiallite extensions will pretty much work with any database connection? e.g. postgis, mysql as well? ..ede On 08.04.2013 16:38, Rahkonen Jukka wrote: Hi, Well, I made a test database from Hamburg and wrote a short manual about installing and testing http://latuviitta.org/documents/OpenJUMP_Spatialite_test_manual.pdf -Jukka- Jukka Rahkonen wrote: edgar Soldin wrote: ok, this sounds too difficult for a last minute inclusion. but we can start on integrating over the course of the next months. can you give me a data test set and/or step by step instructions how it is supposed to work? spatiallite input and spatiallite functions, which seems to be something different? I can make a test database for you from the OpenStreetMap data. What part of Germany would you like to play with? Select from here http://download.geofabrik.de/europe/germany.html -Jukka- -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified
Re: [JPP-Devel] Enhancing DB Query Plugin with Spatialite functions.
On 08.04.2013 20:48, Michaël Michaud wrote: Just wanted to share this thought, but I admit that Spatialite is a mature project which can add nice capabilities with a smaller effort. ok, as far as i understand for now. DBQuery is working and in use. it uses native libs, but on the other hand we will probably not get this functionality going java only. so, let's polish up native libs and DBQuery and consider to add it to PLUS after 1.6.0. Larry: would you be willing to accept patches on the regard above? would be a good opportunity to reuse a native lib loader that i created for the RXTX using gps extension originally. ..ede -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] The new geometry is invalid. Cancelled.
As Michael and Stefan point out, Polygons in a MultiPolygon must be edge-disjoint (which another way of stating the formal definition must only touch at a finite number of points. If they touched along an edge, that would cause an infinite number of points to be coincident). Another way of looking at this is that MultiPolygons are in a sense the canonical description of a given area of the plane. If edge touches or overlaps were allowed then there would be an infinite number of geometries which described the same area. Also, from the point of view of computing polygon overlay and spatial relationships this is a nice rule to have, since it reduces the number of cases which need to be checked for. This makes the code simpler and more performant. The cost is that it is necessary to ensure that MultiPolygons are valid at creation time. This is a reasonable tradeoff, since in general geometries are queried more often than they are created. GeometryCollections on the other hand have no particular semantics - they are just bags of geometries. This makes them useful for holding arbitrary sets of geometries, but makes them more complex (and sometimes slower) to process. On 4/8/2013 11:04 AM, Michaël Michaud wrote: Hi Uwe, Stefan, OpenJUMP (JTS) is right, this MultiPolygon is not OGC conform Here is the citation : Multipolygon 2. The Boundaries of any 2 Polygons that are elements of a MultiPolygon may not ‘cross’ and may touch at only a finite number of points. (Note that crossing is prevented by assertion 1 above). Don't ask me why, I've always thought it is strange that lines can share their boundaries in a MultiLineString and polygons cannot share an edge in a MultiPolygon, but it's a well established rule that JTS follows. Michaël Hi Uwe, I am not sure I would call it a bug. OJ, should (try to) create data that are OGC conform, but in this case it doesn't. Which means, the case needs special treatment, but this is not implemented. That the multi-polygon causes an error is with the OGS SF specification = correct. However, that the geometry collection does not cause an error should be correct aw well, because there is, I believe, nothing said about geometry collections and their validity. Geometry collections should be allowed to have any type of geometries in what ever way they are drawn - like a container. If we would check geometry collections for their validity it may be that people cannot store anymore the data they have. Hence, checking should be optional. But I guess here, Michael M. knows probably more about OGC conformance? I'll also cc to JTS list. cheers, stefan PS: the Multi-polygon: MULTIPOLYGON ((( 80 125, 80 241, 175 241, 175 125, 80 125 )), (( 175 125, 175 241, 263 241, 263 125, 175 125 ))) Am 08.04.13 09:48, schrieb Uwe Dalluege: Hi Stefan, I am afraid I do not understand :-( Do you think this is a bug in OJ? The multipolygon causes an error the geometrycollection not. Is this behaviour OGC-conform (simpel features...)? What do you think? uwe Am 08.04.2013 16:36, schrieb Stefan Steiniger: Hi, so - well the situation is not so nice, as it should be valid. However, the JTS TestBuilder says the Multi-Polgyon is invalid because of Self-intersection at or near point (175.0, 125.0, NaN) Same message appears when you try to add it as a new feature. maybe you can make it valid before by running a zero-buffer over it? stefan Am 08.04.13 07:30, schrieb Uwe Dalluege: Hi, if you put a third geometrie to the two polygons, for instance a linestring, and combine them you will receive a geometrycollection and not a multipolygon. The geometrycollection causes *no* errors but the multipolygon. Uwe Am 08.04.2013 12:05, schrieb Uwe Dalluege: Hi, I get the error: The new geometry is invalid. Cancelled. and I am not shure whether this error is correct. 1. Switch Snap to vertices option. 2. Draw a rectangle. 3. Draw a second rectangle with two identical vertices from the first rectangle (with snap). 4. Select the two rectangles and Combine Selected features 5. Try to move this multipolygon with Move Selected Items Tool. 6. The error appears The new geometry is invalid. Cancelled. 7. The QAValidate Selected Layers... causes a self-intersection in *one* point. Is this a bug in OJ (a precision-problem) or is the new geometry really invalide? Uwe -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html
Re: [JPP-Devel] Enhancing DB Query Plugin with Spatialite functions.
On Mon, Apr 8, 2013 at 1:03 PM, edgar.sol...@web.de wrote: On 08.04.2013 20:48, Michaël Michaud wrote: Just wanted to share this thought, but I admit that Spatialite is a mature project which can add nice capabilities with a smaller effort. ok, as far as i understand for now. DBQuery is working and in use. it uses native libs, but on the other hand we will probably not get this functionality going java only. so, let's polish up native libs and DBQuery and consider to add it to PLUS after 1.6.0. One clarification: my plugin doesn't directly load native libraries. It uses the sqlite JDBC libraries, which handle the loading spatialite and other sqllite extensions. I also share some of the same concerns that Michaël mentioned, and think that adding native libraries introduces risk and complexity: 1. A bug in the native libraries can cause the JVM to crash, taking down OJ in the process (not just a stack trace but an outright crash. 2. When done right, Java is write once, run everywhere. With native libs, you have to provide a library version for each platform you are deploying to: Windows 32bit/64bit, Linux 32/64, Mac OSX PowerPC/Intel, etc. 3. Regarding the spatialite lib, you not only need to include the correct version of that, but the correct versions of everything it depends on, including proj, geos, sqlite, and others. 4. Adding all these libs would reproduce in native code much of what OJ already does in Java. Larry: would you be willing to accept patches on the regard above? would be a good opportunity to reuse a native lib loader that i created for the RXTX using gps extension originally. Ede, I'm always open to new patches, I just don't think a native lib loader is needed due to SQLite JDBC handling the loading. Finally, the main purpose of the DBQuery plugin is to provide a bridge between OJ and spatial databases that it might not support (if any now), as well as provide a way to submit ad-hoc queries that don't have or need backing tables to return features. While I'm glad my recent changes make it more useful for spatialite users, adding all the native libs to support spatialite would weigh it very heavily toward the spatialite side. If the main goal is to improve spatialite, perhaps a better approach is to build up the current sqlite/spatialite plugin to do so? -lreeder ..ede -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Enhancing DB Query Plugin with Spatialite functions.
Hi, I understand the problems with dlls. However, DB Query Plugin in the basic SQLite mode does not need them. All it needs is the JDBC driver (sqlite-jdbc-3.7.15-SNAPSHOT.jar) which does contain native code but it is all packed inside the jar. Perhaps that would suit better for the OJ Plus version. -Jukka Rahkonen- Michaël Michaud wrote: Hi, Just a side note about OpenJUMP + personnal database : I'm sure that SQLite database has great qualities and can add great capabilities to OpenJUMP, but I've always been reluctant to introduce dll into OpenJUMP distribution (difficulty to keep it multiplatform, lack of visibility on C code due to my ignorance, code duplication to achieve the same goal like JTS/Geos in this case...) For these reasons, good or bad, I'd be much more enthousiast to integrate java projects like h2 database (a small java database which can be used both as an embeded database or as a server), hatbox (a spatial index for h2 which works a bit like the one of spatialite (as far as I know), Jaspa (a project adding to all ST_xxx geometry functions to h2). Unfortunately, there is still some work to integrate such projects into OpenJUMP and my time and my skill are too limited for that. Just wanted to share this thought, but I admit that Spatialite is a mature project which can add nice capabilities with a smaller effort. My 2 cents, Michaël Hi, Not really, Spatialite is a spatial extension for SQLite database engine and it does not work with other databases. However, this is not the whole truth and it is indeed possible to use SQLite and Spatialite functions for handling external data that is not stored into the SQLite data file at all. SQLite has some magic system called virtual table which makes it possible to connect a CSV file or Excel spreadsheet virtually from SQLite database without importing data. When this connection is made it is possible to do SQL queries agains the native files as they were real database tables. Of course this connection is not optimal when it comes to speed. GDAL can also utilise SQLite and Spatialite as a database engine. For example, it is possible to do a spatial query against a shapefile (or any other format which is supported by GDAL/OGR) as in this example from the document http://www.gdal.org/ogr/ogr_sql_sqlite.html SELECT EAS_ID, ST_Area(GEOMETRY) AS area FROM poly WHERE ST_Intersects(GEOMETRY, BuildCircleMbr(479750.6875,4764702.0,100)) I don't know how easy or difficult it would be to utilise those advanced features and tricks from Java and OpenJUMP. However, there are many interesting things to do with plain SQL by considering Spatialite just as a zero-configuration relational database http://sqlite.org/zeroconf.html -Jukka. Lähettäjä: edgar.sol...@web.de [edgar.sol...@web.de] Lähetetty: 8. huhtikuuta 2013 17:59 Vastaanottaja: OpenJump develop and use Aihe: Re: [JPP-Devel] Enhancing DB Query Plugin with Spatialite functions. well, done.. thanks. will definitely put that into my queue! one question still: do i understand correctly that spatiallite extensions will pretty much work with any database connection? e.g. postgis, mysql as well? ..ede On 08.04.2013 16:38, Rahkonen Jukka wrote: Hi, Well, I made a test database from Hamburg and wrote a short manual about installing and testing http://latuviitta.org/documents/OpenJUMP_Spatialite_test_manual.pdf -Jukka- Jukka Rahkonen wrote: edgar Soldin wrote: ok, this sounds too difficult for a last minute inclusion. but we can start on integrating over the course of the next months. can you give me a data test set and/or step by step instructions how it is supposed to work? spatiallite input and spatiallite functions, which seems to be something different? I can make a test database for you from the OpenStreetMap data. What part of Germany would you like to play with? Select from here http://download.geofabrik.de/europe/germany.html -Jukka- -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html