Hello Cory,
thank you for your answer. First to say you were right, I had to explain
my problem properly. I was using the tutorial of geotools: "Coordinate
Transformation Services for Geotools 2.0" and I couldn't set the
CoordinateSystemEPSGFactory preferences. If you have access to an EPSG
database you can use it to make different important operations in your
WCTS (Web Coordinate Transformation System). CoordinateSystemEPSGFactory
uses an ODBC data source by default so I needed to develope my service
with a postgreSQL DB and I didn't get the correct way to modify the
initial preferences I said before. There is another point in the same
tutorial, it says: "A CoordinateSystemFactory can be created by giving
your connection and driver to the CoordinateSystemModifiedEPSGFactory
constructor" my problem started 'cause I had not any example at all in
this field and didn't know how to use that constructor correctly.
Finally I could figure out the problem (Yessssss!!!Now I'm happy!!!).
I'm sending the code source, I hope it can be useful for other
geotools-mates :-) Here it goes:
Class.forName("org.postgresql.Driver") ;
Connection conn = DriverManager.getConnection(
"jdbc:postgresql://localhost:5432/EPSG", "postgres","postgres") ;
CoordinateSystemModifiedEPSGFactory epsgBD= new
CoordinateSystemModifiedEPSGFactory(CoordinateSystemFactory.getDefault(),conn);
Cheers!
Con fecha 26/9/2006, "Cory Horner" <[EMAIL PROTECTED]> escribió:
>[EMAIL PROTECTED] wrote:
>
>>I'm developing a Web Coordinate Transformation Service and I'm using
>>Geotools 2 to make this project. I used the Access Data Base of the EPSG
>>to test my aplication and it worked perfectly. Now I would like to
>>create my service and I need to connect with the postgreSQL version. The
>>tutorial information is not enough for me. I don't see clear this
>>issue, how can I employ the postgreSQL data base correctly. So, I'll be
>>glad if anybody could give me a hand with my problem. By the way... I'm
>>in a hurry.
>>
>>
>Hi Román,
>
>Could you elaborate a little? :) What tutorial are you following and
>what seems to be wrong with your setup? Geotools/Postgres/PostGIS
>versions? The first thing that comes to mind is that your postgres
>tables are not postgis enabled, or perhaps the spatial_ref_sys hasn't
>been populated...
>
>Cheers,
>Cory.
>
>----
>Cory Horner
>Refractions Research Inc.
>http://www.refractions.net
>
>
-------------------------------------------------------------------------
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