Hello,

thanks for your reply.

I don't think that extent can be specified in wkt, at least I did not find a
way to do it.
I managed to specify the extent like below:

    public static CoordinateReferenceSystem getDefaultCRS() throws
FactoryException{

        if (defaultCRS != null){
            return defaultCRS;
        }

        Map<String,Object> properties = new HashMap<String,Object>(4);
        properties.put(NAME_KEY, "WGS84(DD)(0..360,-90..90)");


        ExtentImpl extent = new ExtentImpl();
        Collection<GeographicExtent> col = new
ArrayList<GeographicExtent>();
        col.add(new GeographicBoundingBoxImpl(0,360, -90, 90));
        extent.setGeographicElements(col);
        properties.put(DOMAIN_OF_VALIDITY_KEY, extent);
        defaultCRS = new DefaultGeographicCRS(properties,
DefaultGeodeticDatum.WGS84,

DefaultEllipsoidalCS.GEODETIC_2D);


        return defaultCRS;
    }


    public static void main(String[] args) throws IOException,
FactoryException {

System.out.println(DefaultGeographicCRS.WGS84.getDomainOfValidity());
        System.out.println(DefaultGeographicCRS.WGS84.toWKT());
        System.out.println(getDefaultCRS().getDomainOfValidity());
    }


But now how to connect this crs with WGS84 and other default coordinates, in
order to seamlessly use JTS.transform() ?

thank you
--
Oleksandr


2011/2/20 Jody Garnett <[email protected]>

>  The easy way is to parse from well known text.
>
> See:
> - http://docs.codehaus.org/display/GEOTDOC/01+CRS+Helper+Class
>
> --
> Jody Garnett
>
> On Sunday, 20 February 2011 at 2:26 PM, Oleksandr Huziy wrote:
>
> Hello,
>
> Is there an easy way to get from DefaultGeograficCRS.WGS84 an object with
> the same datum, but for which longitude changes from 0 to 360?
>
> I want it because I have polygons intersecting 180 degrees.
> So the points on the different size of 180 meridian are connected using the
> longer arc  from for example -179 to 179 giving dlon=358 degrees, but I want
> dlon=2 degrees.
>
> Or maybe it is possible to change the prime meridian?
> I looked at the examples at codehaus, but they are not up-to-date, since
> the factories used there does not exist anymore.
>
> thank you for any help.
>
> --
> Oleksandr Huziy
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
>
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to