There was some discussion on the list about a year ago about using
GeometryBuilder to create a point.  I'm having the exact same problem that
Jan Goyvaerts was having and am looking for the solution.  Jody originally
suggested that Jan use the JTS Topology Suite until the move to OS Geo stuff
was complete (see pasted conversation below), but I'm now thinking that
migration was recently completed.

I'm a novice Java / GeoTools developer, so I'm not sure how to install the
factory I need.  I'm getting the exact same exception that you see below
doing the exact same thing.  Can anyone give me a push in the right
direction?  Thanks.



-- PASTED CONVERSATION FROM ARCHIVES --


Jan the GeometryBuilder stuff is more of interest to people doing
research into the ISO 19107 Geometry specification. As mentioned int the
user guide please consider the JTS Topology Suite for all serious work
right now. We will hook up the GeometryBuilder stuff when it becomes
more capable (and when someone has funding to do the legwork).

To answer your question you will need to include an implementation of
one of the two plug-ins we have that implements PrimitiveFactory. There
is unsupported/geometry and unsupported/jts-wrapper

Cheers,
Jody

Jody

Jan Goyvaerts wrote:
> GeometryBuilder builder = new GeometryBuilder(DefaultGeographicCRS.WGS84);
> org.opengis.geometry.primitive.Point location =
> builder.createPoint(new double[]{10.0, 10.0});
>
> Not sure whether this is the way it should be done, but if I'm doing
> it this way I'm getting the exception underneath:
>
> org.geotools.factory.FactoryNotFoundException: No factory of kind
> "PrimitiveFactory" found.
> at
>
org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:364)
> at
>
org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.java:115)
> at
>
org.geotools.geometry.GeometryFactoryFinder.getPrimitiveFactory(GeometryFactoryFinder.java:121)
> at
>
org.geotools.geometry.GeometryBuilder.getPrimitiveFactory(GeometryBuilder.java:165)
> at
>
org.geotools.geometry.GeometryBuilder.createPoint(GeometryBuilder.java:298)
> etc ...
>
> Apparently a factory has to be registered prior to creating primitive
> geometries. Or so...
>
> But how ???





-- 
http://giscoder.blogspot.com/
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to