On Tue, May 1, 2012 at 3:36 PM, David Winslow <[email protected]> wrote:
> Creating a schema is actually not that big a problem: assuming that all > datastores create tables (or whatever) that can *accept* features > conforming to the passed-in schema, the REST API importer can handle the > importing without worrying too much about the munging that's going on > "behind the scenes." That's how things work today, and it seems to > generally work fine. Err.. which is exactly the problem. Try importing a shapefile with lowercase attributes in Oracle, if you don't uppercase them manually during the copy you'll get a table with all NULL values, the same will happen with shapefiles afaik (try pushing random GML into a shapefile and you should see that). You need some information about how the attribute names have been transformed to do something sensible. I've attached to this mail two import scripts I use to load shapefiles into Oracle and SDE, you can see that both are using some soft knowledge of how that particular store adds data in order to actually do a successfull import. Both are actually lacking and not really dealing with the whole set of issues (they are just throw-aways anyways). Imho it would be much better if it was the store itself to handle the problem to start with, instead of trying with some external heuristic set that only handles some of the issues we know we have today. I mean.. using createSchema(...) you don't even know if the name of the feature type has been preserved, or not (in general, at least). In Oracle it hasn't for example, it has been turned uppercase, in SDE you get a prefix in front of it. A way to get these feature inside the stores in this release is to have selected stores implement the createSchema(FeatureCollection, Hints) method, and access is reflectively if available, whilst on the new trunk it could be called directly. Or you can go on with the FeatureAdjuster idea... but imho it's only going to be a limited hack That said... maybe I'm talking about a different problem? The thread started talking about conflicts with existing feature types, which is not the same thing as creating a new one and having to deal with how the feature type has been altered by the store. Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 mob: +39 339 8844549 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf -------------------------------------------------------
OracleImporter.java
Description: Binary data
SDEImporter.java
Description: Binary data
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
