How generate a circle polygon

7 messages Options
Embed this post
Permalink
Rafael Soto

How generate a circle polygon

Reply Threaded More More options
Print post
Permalink
Hi Folks,

I'm trying to create a polygon circle feature from point and  defined radius in meters.

How i do it if my point has a EPSG:4326 lat/lon coordinate system and my raius stays in meter?

I think to use a CRS transformation and convert my point feature from EPSG:4326 to POLYCONICAL system, generate a polygon circle and transform back to EPSG:4326 but i found some erros.

someone solve this problema?

Hopes for the solution.

Best regards

--
Rafael Soto


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
mbedward

Re: How generate a circle polygon

Reply Threaded More More options
Print post
Permalink
Hi Rafael,

Can you describe or illustrate the problems that you're having ? Then
we can work out what's going on.

I think you're past this step, but for general reference there is a
User Guide page about creating shapes as Geometry objects here:

http://docs.codehaus.org/display/GEOTDOC/01+How+to+Create+a+Geometry#01HowtoCreateaGeometry-CreatingaCircle

Michael

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Jody Garnett-2

Re: How generate a circle polygon

Reply Threaded More More options
Print post
Permalink
In reply to this post by Rafael Soto
Sounds like your approach is correct.

You have identified that at/lon is not meters :-)

So you will need to create your circle in meters and transform it into  
lat long (resulting in a ellipse of some sort depending on where you  
are in the world.

So can you tell us the errors you are getting?

Jody

On 12/09/2009, at 9:08 AM, Rafael Soto wrote:

> Hi Folks,
>
> I'm trying to create a polygon circle feature from point and  
> defined radius in meters.
>
> How i do it if my point has a EPSG:4326 lat/lon coordinate system  
> and my raius stays in meter?
>
> I think to use a CRS transformation and convert my point feature  
> from EPSG:4326 to POLYCONICAL system, generate a polygon circle and  
> transform back to EPSG:4326 but i found some erros.
>
> someone solve this problema?
>
> Hopes for the solution.
>
> Best regards
>
> --
> Rafael Soto
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
> 30-Day
> trial. Simplify your report design, integration and deployment - and  
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july_______________________________________________
> Geotools-gt2-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Rafael Soto

Re: How generate a circle polygon

Reply Threaded More More options
Print post
Permalink
My problem now is only on transformation process.
I need to transform lat/lon EPSG: 4326 to Brazilian Polyconic SIRGAS 2000.
Brazilian Polyconic is not present in EPSG but i have a WKT parameters bellow:

SIRGAS_2000_POLYCONICAL

PROJCS[\"SIRGAS 2000 / Brazil Polyconic\",GEOGCS[\"SIRGAS 2000\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4674\"]],PROJECTION[\"Polyconic\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",-54],PARAMETER[\"false_easting\",5000000],PARAMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]]

When i run this line,

CoordinateReferenceSystem targetCRS = CRS.parseWKT(EPSGConstants.SIRGAS_2000_POLYCONICAL);

Error is

WARNING: Can't load a service for category "MathTransformProvider". Cause is "NoClassDefFoundError: javax/media/jai/WarpAffine".
org.opengis.referencing.NoSuchIdentifierException: No transform for classification "Polyconic".
    at org.geotools.referencing.operation.DefaultMathTransformFactory.getProvider(DefaultMathTransformFactory.java:277)
    at org.geotools.referencing.operation.DefaultMathTransformFactory.getDefaultParameters(DefaultMathTransformFactory.java:304)
    at org.geotools.referencing.wkt.Parser.parseProjection(Parser.java:575)
    at org.geotools.referencing.wkt.Parser.parseProjCS(Parser.java:879)
    at org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:240)
    at org.geotools.referencing.wkt.Parser.parseCoordinateReferenceSystem(Parser.java:221)
    at org.geotools.referencing.factory.ReferencingObjectFactory.createFromWKT(ReferencingObjectFactory.java:913)
    at org.geotools.referencing.CRS.parseWKT(CRS.java:431)

On Fri, Sep 11, 2009 at 11:33 PM, Jody Garnett <[hidden email]> wrote:
Sounds like your approach is correct.

You have identified that at/lon is not meters :-)

So you will need to create your circle in meters and transform it into lat long (resulting in a ellipse of some sort depending on where you are in the world.

So can you tell us the errors you are getting?

Jody


On 12/09/2009, at 9:08 AM, Rafael Soto wrote:

Hi Folks,

I'm trying to create a polygon circle feature from point and  defined radius in meters.

How i do it if my point has a EPSG:4326 lat/lon coordinate system and my raius stays in meter?

I think to use a CRS transformation and convert my point feature from EPSG:4326 to POLYCONICAL system, generate a polygon circle and transform back to EPSG:4326 but i found some erros.

someone solve this problema?

Hopes for the solution.

Best regards

--
Rafael Soto

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users




--
Rafael Soto
Sent from Brasilia, DF, Brazil

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
mbedward

Re: How generate a circle polygon

Reply Threaded More More options
Print post
Permalink
Hi Rafael,

I'm afraid that looks like the projection is not yet supported -
GeoTools can't find an appropriate maths transform provider class to
handle polyconic. So your options are to do the reprojection with
another tool or attempt to add the polyconic projection...

http://docs.codehaus.org/display/GEOTDOC/How+to+add+new+projections

Michael

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Rafael Soto

Re: How generate a circle polygon

Reply Threaded More More options
Print post
Permalink
OK.

Thank's for all!

On Sun, Sep 13, 2009 at 2:30 AM, Michael Bedward <[hidden email]> wrote:
Hi Rafael,

I'm afraid that looks like the projection is not yet supported -
GeoTools can't find an appropriate maths transform provider class to
handle polyconic. So your options are to do the reprojection with
another tool or attempt to add the polyconic projection...

http://docs.codehaus.org/display/GEOTDOC/How+to+add+new+projections

Michael



--
Rafael Soto


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
jv-2

Re: How generate a circle polygon

Reply Threaded More More options
Print post
Permalink
Hi, I think this is just a technical problem. I've been fighting it for a week until I realized it's just a lack of jars in the jdk install. For some reason there're versions of the development kit that doesn't come with the jai jar. It's weird because it's an standard extension already available for example if you install de jdk on Ubuntu.
You only need to download it (from http://www.findjar.com/class/javax/media/jai/WarpAffine.html, fore example) and copy the file to the lib/ext folder of the jre.
Of course, you also need to install the rest of the jai feature (does not work right now but just google for "jai binary downloads java.net").
Hope it helps.
jv

On Sun, Sep 13, 2009 at 2:15 PM, Rafael Soto <[hidden email]> wrote:
OK.

Thank's for all!


On Sun, Sep 13, 2009 at 2:30 AM, Michael Bedward <[hidden email]> wrote:
Hi Rafael,

I'm afraid that looks like the projection is not yet supported -
GeoTools can't find an appropriate maths transform provider class to
handle polyconic. So your options are to do the reprojection with
another tool or attempt to add the polyconic projection...

http://docs.codehaus.org/display/GEOTDOC/How+to+add+new+projections

Michael



--
Rafael Soto


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users




--
=======================================================
Javier Moreno
www.imaginafoto.com
=======================================================

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users