Migrating to Postgis

3 messages Options
Embed this post
Permalink
Leonardo Rodriguez

Migrating to Postgis

Reply Threaded More More options
Print post
Permalink
At this moment, i have a working application, but the database is
"static" in the sense that it's created based on a shapefile, using
ShapefileDataStore. When i need a change in the data, i need change
the shapefile. So, i'm thinking in creating a database using postgis.
To avoid change the rest of code, i need, for example, read the data
of the new database and build a
FeatureCollection<SimpleFeature,SimpleFeatureType>
What is the most used process (if there is) to transform a postgis
data (for example, a row of a table with a the_geom column) to a
SimpleFeature?
Can you give some other hints to the migration?
It is not necessary that you explain me everything, i just need you
suggest me some link or example.
Thanks!

------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
aaime

Re: Migrating to Postgis

Reply Threaded More More options
Print post
Permalink
Leonardo Rodriguez ha scritto:

> At this moment, i have a working application, but the database is
> "static" in the sense that it's created based on a shapefile, using
> ShapefileDataStore. When i need a change in the data, i need change
> the shapefile. So, i'm thinking in creating a database using postgis.
> To avoid change the rest of code, i need, for example, read the data
> of the new database and build a
> FeatureCollection<SimpleFeature,SimpleFeatureType>
> What is the most used process (if there is) to transform a postgis
> data (for example, a row of a table with a the_geom column) to a
> SimpleFeature?
> Can you give some other hints to the migration?
> It is not necessary that you explain me everything, i just need you
> suggest me some link or example.

I don't have examples at hand but all you have to do is to use
a Postgis datastore instead of the Shapefile one, everything else
should keep on working as before.

The guide has a couple of pages about the PostGIS data store:
http://docs.codehaus.org/display/GEOTDOC/Home

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/blackberry
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Justin Deoliveira

Re: Migrating to Postgis

Reply Threaded More More options
Print post
Permalink
<snip>
>
> I don't have examples at hand but all you have to do is to use
> a Postgis datastore instead of the Shapefile one, everything else
> should keep on working as before.
>
> The guide has a couple of pages about the PostGIS data store:
> http://docs.codehaus.org/display/GEOTDOC/Home
>
We also recently added a jdbc demo module, which while written again H2
could easily be adapted for postgis:

http://svn.osgeo.org/geotools/trunk/demo/jdbc/

-Justin

> Cheers
> Andrea
>


--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users