Adrian Custer wrote:
Hey Jody,
Is there an online javadoc presentation of the 2.2.x branch of geotools
rather than the 2.3.x branch? It seems like all uDig user questions, and
most geotools user questions should point to the 2.2.x branch rather
than to the javadocs of head (aka 2.3). We have enough headaches without
using javadocs for a different version of geotools than what uDig is
based on.
Unless you all are *way* ahead of me and working on some bleeding edge
stuff. ;-)
There is only like a weeks differences on 2.3.x turnk, most of the work
is in a branch waiting to land.
Your point of putting up some javadocs is good, lets ask on mondays
meeting for a volunteer. Or beg martin right now -.
Martin?
- can we post some javadocs from the 2.2.x branch? Part of Dave marking
things stable is the need to post the javadocs.
I am not sure if 2.2.x has your fancy maven 2 build that can actually
produce javadocs or not. Do you know?
Jody
all the best,
adrian
(yes, of course, in this case it doesn't matter yet. But users have a
funny way of clicking on links and getting into all sorts of new areas).
On Sat, 2006-03-11 at 10:57 +0200, Jody Garnett wrote:
You guys are working to hard, I wrote a parser method I never wanted to
do this stuff twice.
-
http://udig.refractions.net/docs/api-geotools/org/geotools/data/DataUtilities.html
The format is silly, but it is in the javadocs:
-
http://udig.refractions.net/docs/api-geotools/org/geotools/data/DataUtilities.html#createType(java.lang.String,%20java.lang.String)
basically: "name:String,age:Number,position:Point,*destination:Point"
Where the * indicates the default geometry ..
Other useful stuff:
-
http://udig.refractions.net/docs/api-geotools/org/geotools/feature/FeatureTypes.html
Jody
M.S.Bachler wrote:
Hi!
Silly question.
Earlier you helpfully gave me a code snippet to create a new shapefile.
IndexedShapefileDatastoreFactory fac=new
IndexedShapefileDataStoreFactory();
ShapefileDataStore ds=fac.createDatastore(url);
// I assume this is the URL of the new shapefile I want it to create?
GeometryFactory gf = new GeometryFactory();
ds.createSchema( featureType );
// Here I got lost. Started to investigate FeatureType and felt like
I was walking through tar.
I did some stuff with FeatureType the other day... trying to create a
new Feature from scratch. Here is the code I found to create a new
FeatureType:
AttributeType geomAttr =
AttributeTypeFactory.newAttributeType("the_geom", LineString.class);
FeatureType ftRoad = FeatureTypeBuilder.newFeatureType(new
AttributeType[] {geomAttr}, "road");
// WKTReader wktReader = new WKTReader();
// Point geometry = (Point) wktReader.read("POINT (" + lat + " " + lon
+ ")");
GeometryFactory geomFactory = new GeometryFactory();
LineString geometry = geomFactory.createLineString(coords);
Feature theRoad = ftRoad.create(new Object[] {geometry},
"myRoad");
This example Feature only has one attribute which is the geometry,
the_geom. You can create and add other attributes in the
AttributType[] and Object[] if needed.
These classes are from the org.geotools.feature package.
Hopefully you may find this useful. I'm not sure if this is the most
up-to-date way of doing it, but it worked for me.
Mark
--
This message has been scanned for viruses and dangerous
content by *MailScanner* <http://www.mailscanner.info/>, and is
believed to be clean.
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel