Good Afternoon,

DataUtilities createType is my fault :-) Intended for quick and dirty 
test cases construction. To do the real thing you can use
FeatureTypeFactory (hard) or FeatureTypeBuilder (also hard).  Making 
this easy and consistent is one of the QA goals for
GeoTools 2.4.

With respect to oracle and CRS information you will need to look at your 
Oracle metadata tables (and look up and parse
the WKT for the SRID). I am putting together a plan to fix up the 
OracleDataStore, so perhaps there is room for
collaboration :-)

Best of luck, and tag us in for an IRC chat if you get stuck.
Jody

> Many thanks for the suggestions on implementing a custom data store. And 
> apologies for not replying sooner. It seems that sourceforge email lists 
> wasn't accepting messages from gmail accounts for awhile.
>
> On Paul's assertion, I asked our DBA to root around our Oracle 
> installation a bit and she found the package to install Oracle Locator. 
> The Oracle documentation doesn't do a great job making a distinction 
> between Locator and Spatial. But we do have that option open to us, 
> although it is currently our 3rd choice for a solution.
>
> A co-worker found the gen2shp C package, which creates shapefiles from 
> text files. I ran a quick example using a subset of our data as a proof 
> of concept, and was very pleased at how easy it was to put the resulting 
> shapefile in GeoServer. It would be about a day of work to automate 
> those steps, so we now have a customizable solutions for our first 
> prototype.
>
> But in the longer term we think we do want to implement a Custom data 
> store, and I have done some work along those line. I did manage to 
> create a datastore, roughly following the online tutorial. And got it to 
> show up in the GUI. But when I try using the FeatureType Editor web page 
> to create a feature from the data store, I get a null pointer exception. 
> I tracked down the root cause, and think I have encountered a bug.
>
> The exception is due to the fact that the GeometryAttributeType returned 
> by getDefaultGeometry()
> on the feature type I created for my datastore returns null for 
> getCoordinateSystem(). Following the code, this is logical - I created 
> the FeatureType with DataUtilities.createType(String, String) and that 
> method creates AttributeTypes in the following fashion:
>
> (DataUtilities line 1296): AttributeTypeFactory.newAttributeType(name, 
> type(type));
>
> ie, without the metadata option of newAttributeType:
>
> (AttributeTypeFactory line 80-93)
>
>      /** Creates a new AttributeType with the addition of MetaData.
>       * <p>
>       * Currently MetaData is used to supply the CoordinateSequence
>       * when making a GeometryAttributeType.
>       * </p>
>       * @param name
>       * @param clazz
>       * @param isNillable
>       * @param fieldLength
>       * @param defaultValue
>       * @param metaData
>       * @return
>       */
>
>   public static AttributeType newAttributeType(String name, Class clazz,
>          boolean isNillable,int fieldLength,Object defaultValue, Object 
> metaData)
>
> I believe this behavior is a bug, since createType does check for 
> geometry-based attributes, and sets the default geometry. But that 
> default geometry doesn't have a coordinate system... Or maybe I'm 
> misunderstanding the usage of DataUtilities.createType?
>
> Thanks, Joanna
>
> Joanna Muench
> Software Engineer
> IRIS Data Management Center
> www.iris.edu
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>   


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to