Hi,
Johannes Kröger wrote: > Hi! > I sent this earlier but I guess unsubscribed sender's emails are silently > dropped? > This is not really important, I am just playing around and got curious. > 1) I noticed that OpenJUMP will ignore the CRS of shapefiles that I open. > Does it have no support for files with different CRS in the same project? I > am used to the QGIS luxus where "on the fly" transformation are available to > work with any data in a shared CRS. Originally OpenJUMP has no support for projections at all. It just blindly took the data as they are and saved alike. Based on the number of open QGIS bugs and questions in the QGIS-users list the luxury of on-the-fly has also another side. Some functionalities in QGIS work fine with the OTF layers while some others don't. The Coordinate transformation plugin appeared in December, 21014 http://jump-pilot-devel-openjump-develop-and-use.1063199.n5.nabble.com/JPP-Devel-OpenJUMP-Coordinate-Transformation-Suite-td5710807.html. At least in these early days of projection support I think it is better to not implement on-the-fly transformations into OpenJUMP. Working with physically re-projected layers is at least safe. > 2) Can I set the CRS for a shapefile I am writing using code around the > ShapeWriter class and if so, how? I am not looking for transformation, the > coordinates are already fine, I just want to have GIS tools not prompt for > the CRS when I open the shp. Michaël will probably tell more but the CTS library https://github.com/irstv/CTS seems to have code for handling .prj files in https://github.com/irstv/CTS/tree/master/src/main/java/org/cts/parser/prj. However, PRJ and WKT are rather fuzzy systems for defining the projections. GDAL has special "morphToESRI" methods for making conversions between the OGC/GDAL/ESRI style presentations and based on the open GDAL tickets there are still many special cases where the conversion fails. I think that if CTS has support for prj and CTS will be included in the OpenJUM core then OpenJUMP could be made to utilize it and read prj when opening the shapefile and write prj when saving. If it fails OJ could behave as it does now and just does not care. > FeatureSchema has a setCoordinateSystem(coordinateSystem) method. I probably > gave it a bad CoordinateSystem but it was not used anyways when I wrote the > shapefile. I saw that com.vividsolutions.jump.coordsys really does not > contain much so it this stuff work in progress or abandoned or am I just > blind? :) Shapefile writer ignores CRS as well as writing into JML . I believe that PostGIS writer is utilizing CRS/SRID. > I know I can just write a .prj file myself, but ideally I would not touch > those projection strings myself because I like to make mistakes. I think that I agree. Writing shapefiles with prj would be a useful feature, as well as adding srsName element into JML schema. Did you know that GDAL can also read and write JML format http://www.gdal.org/drv_jml.html? Once GDAL 2.0 is out which may happen within couple of months you can open JML files directly with QGIS. -Jukka Rahkonen- > Thanks, Hannes ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel