Re: [Geotools-gt2-users] Problems constructing a deafault for a CRS

2013-09-29 Thread gaby
I know why this is happening. In the calculation of the envelope, the east bound longitude is negative. The code is obviously not aware of this quirk. Is this something that can be fixed with a setting, or??? Gaby -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Problems

[Geotools-gt2-users] Problems constructing a deafault for a CRS

2013-09-26 Thread gaby
127434E8] What is the issue here, and can it be overcome? Thanx GAby -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Problems-constructing-a-deafault-for-a-CRS-tp5080402.html Sent from the geotools-gt2-users mailing list archiv

[Geotools-gt2-users] How to construct a default extent for a given CRS?

2013-09-23 Thread gaby
I've been trying to figure out how to construct the extent of a given CRS to use as a "default". But I have not been successful. Does anyone have an example on how to do this from a CordinateReferenceSystem object? Thanx Gaby -- View this message in context: http://os

Re: [Geotools-gt2-users] Can one check that one coordinate system can be reprojected into another

2013-09-16 Thread gaby
Actually what I wrote above did not work too well for some coordinate systems, this seems to be better GeographicBoundingBoxImpl bb1 = new GeographicBoundingBoxImpl(CRS.getGeographicBoundingBox(crs1)); GeographicBoundingBoxImpl bb2 = new GeographicBoundingBoxImpl(CRS.getG

Re: [Geotools-gt2-users] Can one check that one coordinate system can be reprojected into another

2013-09-16 Thread gaby
This seems to work OK. Simply using transforms does not seem to work, I've never gotten it to fail, at most I've gotten "warnings" which I cannot catch in the code. I transform both CRS's areas of validity to WSG89 envelopes and see if they intersect: CoordinateReferenceSys

[Geotools-gt2-users] Can one check that one coordinate system can be reprojected into another

2013-09-15 Thread gaby
... Or does one have to come up with their own method of doing so? Thanx Gaby -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Can-one-check-that-one-coordinate-system-can-be-reprojected-into-another-tp5077995.html Sent from the geotools-gt2-users mailing list archive at

Re: [Geotools-gt2-users] Help creating an image + world file from an ArcGrid file

2013-08-20 Thread gaby
OK the problem is the number of color bands. If I do this: CoordinateReferenceSystem crs = CRS.decode("EPSG:27200"); reader = new ArcGridReader(new File("TestData/test.asc"), new Hints(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM, crs)); GridCoverage2D coverage = reader.read(null); Re

Re: [Geotools-gt2-users] Using WorldImageReader when missing prj file

2013-08-20 Thread gaby
The correct hint to to use is Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM Duh! -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-WorldImageReader-when-missing-prj-file-tp5073256p5073473.html Sent from the geotools-gt2-users mailing list archive at Nabble.com. ---

[Geotools-gt2-users] Strange behaviour (bug?) reading and then writing georeferenced PNG

2013-08-20 Thread gaby
When I do something like this File filein = new File("TestData/rks.png"); File fileout = new File("TestData/rks_new.png"); WorldImageReader reader = new WorldImageReader(filein); GridCoverage2D myGridCov = reader.read(null); WorldImageWriter wiw = new WorldImageWriter(fileout); wiw.write(myGridCov

[Geotools-gt2-users] Using WorldImageReader when missing prj file

2013-08-19 Thread gaby
new WorldImageReader(filein, new Hints(Hints.CRS, crs)); GridCoverage2D myGridCov = reader.read(null); But I still get: INFO: Unable to find crs, continuing with default CRS Thanx gaby -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-WorldImageReader-when-missing-prj

[Geotools-gt2-users] Help creating an image + world file from an ArcGrid file

2013-08-13 Thread gaby
g it in the hints, or whether it is something else. The asc file has no information about the CRS, so I need to define that myself. Thank you Gaby -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Help-creating-an-image-world-file-from-an-ArcGrid-file-tp5072384.html Sent from th

Re: [Geotools-gt2-users] Why does writing out a world image takes minutes?

2013-08-04 Thread gaby
Apparently, I don't need to set the parameters. If I do it slows everything down gaby -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Why-does-writing-out-a-world-image-takes-minutes-tp5068335p5070751.html Sent from the geotools-gt2-users mailing list archive at Nabbl

Re: [Geotools-gt2-users] Need help reprojecting ReferencedEnvelope

2013-07-30 Thread gaby
OK, I will make a special case for the NZTM EPSG code where I handcraft the ReferenceEnvelope by hand in my code. In our previous discussion this had been discouraged, as was setting the system property. What I wanted to point out is that using the OGC URN code is not fixing my problem when reproje

Re: [Geotools-gt2-users] Need help reprojecting ReferencedEnvelope

2013-07-30 Thread gaby
ceCRS); This, as discussed previously, is not a acceptable solution. 4) Raster reprojection from NZTM to NZMG works OK for the code as above (with EPSG codes reversed) So it seems to me, that there is a bug somewhere in the ReferencedEnvelope reprojection. How to proceed? Gaby -

Re: [Geotools-gt2-users] Need help reprojecting ReferencedEnvelope

2013-07-30 Thread gaby
So, I've tried using the OGC URN code rather than setting the system property to force XY order and *it did not work* when reprojecting rasters from NZMG to NZTM, they end up 90 degrees out of phase and squished. But I am still stuck with reprojecting "hand crafted" ReferencedEnvelopes. I will try

Re: [Geotools-gt2-users] Need help reprojecting ReferencedEnvelope

2013-07-28 Thread gaby
I agree with you Ben, it is not robust at all and it gives me nightmares about other coordinate systems. I will try using the OGC urn code instead. Does anyone have a link for how to come up with the codes? Thanx Gaby -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Need

Re: [Geotools-gt2-users] Need help reprojecting ReferencedEnvelope

2013-07-28 Thread gaby
Yes, that worked! gaby -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Need-help-reprojecting-ReferencedEnvelope-tp5069254p5069265.html Sent from the geotools-gt2-users mailing list archive at Nabble.com

Re: [Geotools-gt2-users] Need help reprojecting ReferencedEnvelope

2013-07-28 Thread gaby
nstructing any object "by hand" so to speak. I did notice the inversion on NoRTHING/EASTING coordinates but I did not pay it much attention So am I right in undestanding that my NZTM envelope should be ReferencedEnvelope envelope = new ReferencedEnvelope(miny, maxy, minx, miny, sourceCR

[Geotools-gt2-users] Need help reprojecting ReferencedEnvelope

2013-07-28 Thread gaby
6272"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic latitude", NORTH], AXIS["Geodetic longitude", EAST], AUTHORITY["EPSG","4272"]],

Re: [Geotools-gt2-users] Reprojection error?

2013-07-24 Thread gaby
OK, I've figured it out. I need to use System.setProperty("org.geotools.referencing.forceXY", "true");. I did try using Hints, but it did not seem to work. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Reprojection-error-tp5068565p5068570.html Sent from the geotools-gt2-

[Geotools-gt2-users] Reprojection error?

2013-07-24 Thread gaby
arameterValue[] gpv = { params.parameter(WorldImageFormat.FORMAT.getName().toString()) }; wiw.write(reprojected, gpv); wiw.dispose(); } catch (Exception e) { } Gaby -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Reprojection-error-tp50685

[Geotools-gt2-users] Why does writing out a world image takes minutes?

2013-07-23 Thread gaby
e.printStackTrace(); } catch (FactoryException e) { e.printStackTrace(); } Thanx Gaby -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Why-does-writing-out-a-world-image-takes-minutes-tp5068335.html Sent from the geotools-gt2-

Re: [Geotools-gt2-users] Cannot save reprojected georeferenced raster to file

2013-07-22 Thread gaby
I've figured out part 1) too, it just takes an incredible long time to write out the files and I was not waiting long wnough -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Cannot-save-reprojected-georeferenced-raster-to-file-tp5068102p5068109.html Sent from the geotools-gt

Re: [Geotools-gt2-users] Cannot save reprojected georeferenced raster to file

2013-07-22 Thread gaby
I've figured out what I was doing wrong when trying to write to file the reprojected geotiff file, but I am still stuck of with writing out the reprojected world image PNG -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Cannot-save-reprojected-georeferenced-raster-to-file-t

[Geotools-gt2-users] Cannot save reprojected georeferenced raster to file

2013-07-22 Thread gaby
nner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Any ideas on how to proceed? Thank you Gaby -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Cannot-save-reprojected-georeferenced-raster-to-file-tp5068102.html Sent from th

[Geotools-gt2-users] Examples of doing reprojections of georeferenced PNG images

2013-07-22 Thread gaby
ration.OperationNotFoundException: Bursa wolf parameters required. Also, how do I write out the reprojected grid coverage out to file again? Thanx Gaby -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Examples-of-doing-reprojections-of-georeferenced-PNG-images-tp50680

[Geotools-gt2-users] Network analysis tools based on geotools?

2009-10-12 Thread gaby
ak. Thanx in advance Gaby -- View this message in context: http://n2.nabble.com/Network-analysis-tools-based-on-geotools-tp3810161p3810161.html Sent from the geotools-gt2-users mailing list archive at Nabble.com. -- Come

Re: [Geotools-gt2-users] Help with AnchorPoint

2008-01-23 Thread gaby
.5, 1.5) works very well :-) gaby -- View this message in context: http://www.nabble.com/Help-with-AnchorPoint-tp15034681p15055590.html Sent from the geotools-gt2-users mailing list archive at Nabble.com. - This SF.n

Re: [Geotools-gt2-users] Help with AnchorPoint

2008-01-23 Thread gaby
nly time I got this to work was for a data set that actually had XCOORD and YCOORD attributes hence my AnchorPoint was given by AnchorPoint anchorPoint = sb.createAnchorPoint(sb.attributeExpression("XCOORD"), sb.attributeExpression("YCOORD")); gaby -- View this message in cont

Re: [Geotools-gt2-users] How do I remove a rule from a FeatureTypeStyle

2008-01-21 Thread gaby
gaby wrote: > > My application has editing functionality so the user can set up rules for > a > style, and even edit such rules (just colors right now), but although > there's an > addRule(..) method, I can't figure out how to allow the user to remove a > rule

Re: [Geotools-gt2-users] Saving FeatureSource to shapefile

2008-01-21 Thread gaby
gt;>because sometimes the typeName will >>be different (often for a shapefile it is the same as the filename - no >>matter what you asked for!). > Yep, but it's not obvious is it, would be nice if it was documented in the > javadocs. > > gaby > > > > --

Re: [Geotools-gt2-users] Help creating a shapefile and saving to file

2008-01-17 Thread gaby
Jody Garnett wrote: > > Gabriella Turek wrote: >>dataStore.forceSchemaCRS(currentCRS); >> > There is no need for this line if your original feature type had CRS > information. > > > Nope, if you don't put this line in, then no prj

Re: [Geotools-gt2-users] Saving FeatureSource to shapefile

2008-01-17 Thread gaby
Next you need to grab a FeatureStore and called addFeatures; there is an example of this kind of thing in the user guide. And we can add your example here when we are done with it >> Hello, I am wondering if there is a simple way of saving a FeatureSource >> to a >> shapefile. The FeatureS