[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] How to get vector data in udig
|
uDig TableView works by:
1) Watching the workbench selection for the next "selected" Layer
2) Layer -> GeoResource
3) GeoResource.canResolve( SimpleFeatureStore.class ) = true; and then GeoResource.resolve( SimpleFeatureStore.class, progress) --> SimpleFeatureStore
4) SimpleFeatureStore.features( Query ) --> SimpleFeatureCollection
The SimpleFeatureCollection is what is displayed…
--
Jody Garnett
On Tuesday, 8 May 2012 at 9:24 PM, alessandra.baccari@xxxxxxxxxxx wrote:
I must do another catalog as MySql, but with the differrence that i haven't need of connection!but I want that when I click on name of my catalog opens a wizard that contains the workflow of my tool graphic and the table!When I choose a table, I want to display it in udig!So, I want know how
Udig renders the table of mySql!
Can you help me?
----Messaggio originale----
Da:
jody.garnett@xxxxxxxxx
Data: 6-mag-2012 15.30
A: <
alessandra.baccari@xxxxxxxxxxx>, "User-friendly Desktop Internet GIS"<
udig-devel@xxxxxxxxxxxxxxxxxxxxx>
Ogg: Re: [udig-devel] How to get vector data in udig
There should be examples of how to add your database to the uDig 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.
On Friday, 4 May 2012 at 9:10 PM, alessandra.baccari@xxxxxxxxxxx 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)