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
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
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
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
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
... 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
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
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.
---
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
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
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
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
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
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
-
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
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
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
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
6272"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic latitude", NORTH],
AXIS["Geodetic longitude", EAST],
AUTHORITY["EPSG","4272"]],
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-
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
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-
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
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
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
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
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
.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
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
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
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
>
>
>
>
--
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
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
33 matches
Mail list logo