I would like to display Google maps (Raster and Vector) in Java using GeoTools. I am stuck because I am new to this library. Are there any tutorials out there that can help me ?
1 Answer
geotools is not a rendering library. It a Java toolkit which can read spatial data and provides access to geometry,attributes in the data. It provides certain algorithm for geometry processing. JTS, Java Tolplogy Suite contained in GeoTools.
This was ported to C/C++ as GEOS. You can try GeoServer which uses geotools for processing and uses OpenLayers for viewing maps. OpenLayers defenitely allows you to display google maps.
And for the records you cant get raster/vector data from google for free using any libs available. The provide maps as a service collectively called as WMS (Web Map services). These dish out non georeferenced images as png/jpeg which cannot be used for any spatial operation.
Also please see the T&C for using Google Maps
-
Thank you for the answer. I would like to use to use OpenLayers. But I have to do a desktop this is why I am trying to use GeoTools. Is there Java library like OpenLayers ? Commented Nov 20, 2012 at 16:01
-
1there are some java based libs: OpenJUMP, gvSIG, uDIG, KOSMO SAIG are some gis applications. but you can use their api to acheive the same. They support WMS but I am afraid you can use google maps, QGIS has an openlayers plugin. But its C++/Python– rkmCommented Nov 20, 2012 at 16:52