There should be examples of how to add your database to the uDig catalog.
- http://udig.refractions.net/confluence/display/DEV/2+Catalog
The example for PostGIS as as follows:
Map<String,Serializable> params = new HashMap<String,Serializable>();
params.put("dbtype", "postgis"); // must be "postgis" params.put("host",
"www.refractions.net"); // the name or ip address of the machine running
PostGIS params.put("port", new Integer(5432)); // the port that PostGIS is
running on (generally 5432) params.put("database", "demo-bc"); // the name of
the database to connect to. params.put("user", "demo"); // the user to connect
with params.put("passwd", "demo"); IRepository local =
CatalogPlugin.getDefault().getLocal(); IService service = local.acquire(
params, new NullProgressMonitor() );
Or you may wish to try using the GeoTools classes directly? Notice this page
also has the connection parameters to use with the uDig catalog above.
- http://docs.geotools.org/latest/userguide/library/jdbc/mysql.html
--
Jody Garnett
On Friday, 4 May 2012 at 9:10 PM, [email protected] wrote:
> Hi!
> After i have choose mySql database and table, what is the block of code (in
> java) that gets the geographical information(vector data)?
> Thanks to much!
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
>
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel