Hi Mohammed,

I've wrote this example Jython code:

{code}
from com.vividsolutions.jump.coordsys.impl import
PredefinedCoordinateSystems

layer = wc.layerManager.getLayer("examplelayer")
schema = layer.featureCollectionWrapper.featureSchema

coordinateSystem = PredefinedCoordinateSystems.GEOGRAPHICS_WGS_84
schema.setCoordinateSystem(coordinateSystem)

print schema.coordinateSystem
{code}

As the javadoc states: Sets the CoordinateSystem associated with this
FeatureSchema, but does not perform any reprojection.

http://jump-pilot.sourceforge.net/javadoc/openjump_javadoc/com/vividsolutions/jump/feature/FeatureSchema.html

Maybe someone else knows how to perform reprojection, if needed.

Greetings from Hannover, Germany

Benjamin

BTW: Jython code to Java translated (but not tested)

{code}
Layer layer = plugInContext.getLayerManager().getLayer("examplelayer");
FeatureSchema schema =
layer.getFeatureCollectionWrapper().getFeatureSchema();

CoordinateSystem coordinateSystem =
PredefinedCoordinateSystems.GEOGRAPHICS_WGS_84;
schema.setCoordinateSystem(coordinateSystem);
{code}

2010/12/12 Mohammed Rashad <[email protected]>

>
> Hi,
> How to set coordinate reference system to layer by code
> --
> Rashad
>
>
> ------------------------------------------------------------------------------
> Oracle to DB2 Conversion Guide: Learn learn about native support for
> PL/SQL,
> new data types, scalar functions, improved concurrency, built-in packages,
> OCI, SQL*Plus, data movement tools, best practices and more.
> http://p.sf.net/sfu/oracle-sfdev2dev
> _______________________________________________
> Jump-pilot-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to