-
1. Re: Shape file Teiid
rareddy Apr 18, 2018 12:29 PM (in response to parrotola)Maybe little more context on what you are trying to do? I do not understand either shape or what that has to do with postgres?
-
2. Re: Shape file Teiid
parrotola Apr 19, 2018 3:16 AM (in response to rareddy)Hi Ramesh,
sorry for misunderstang, I want to map an ESRI shape file with TEIID. How I can add these files (ESRI Shape) in my model?
Until now I have imported all in a Postgis/postgres datastore, but now I need to map directly the files in a folder.
Thank you very much
Best regards
Francesco
-
3. Re: Shape file Teiid
parrotola Apr 20, 2018 8:28 AM (in response to parrotola)Hi Ramesh,
are there any function to import geoJson instead of shape file?
thank you
Francesco
-
4. Re: Shape file Teiid
rareddy Apr 20, 2018 9:27 AM (in response to parrotola)See this that can help with GeoJson content Spatial Functions · Teiid Documentation
-
5. Re: Shape file Teiid
tom9729 May 1, 2018 1:10 AM (in response to parrotola)Teiid supports GeoJSON for geometries but not feature collections or properties; I mean GeoJSON like https://gist.github.com/cspanring/825336?short_path=365e696#file-bike-rack-json where each object in "features" would map to a row in a table.
For something quick you could probably use GDAL/OGR to convert the Shapefile to GML, and then use the Teiid file translator to read in the GML and make a view using XPath and ST_GeomFromGML for the Geometries. (You could do the same with GeoJSON although I'm not familiar with the Teiid JSON functions aside from using JSONTOXML, which you would not want to do because it would convert the geometry part to XML.)
A little more work would be developing a translator using GeoTools: Shapefile Plugin — GeoTools 19-SNAPSHOT User Guide. It's long been on my todo list to make a generic GeoTools Datastore translator; this would allow Teiid to make a lot of the same connections that Geoserver supports (e.g. WFS).