Fabrizio,
I might be a bit late, but here are some pointers. The ogr2ogr tool can
convert Shapefiles into various other geospatial formats:
http://www.bostongis.com/PrinterFriendly.aspx?content_name=ogr_cheatsheet
What you are looking for is a renderer, though -- i.e. a tool that turns
geospatial data into a graphic. My preferred one is GeoServer:
http://geoserver.org/display/GEOS/Welcome
It's build on top of the already mentioned GeoTools (I believe it is
actually mostly the same developer group). GeoServer is web-based, but
it will let you upload a Shapefile and download an SVG. Somewhere in
GeoTools you probably find the same capability as command-line tool or
Java API that allows implementing such tool. But I don't know it well
enough to help you with that.
The look of the SVG is controlled by an XML based styling format (SLD -
Styled Layer Descriptor). You will probably have to learn a bit about
that unless you want to use more tools. Some of the GIS desktop apps
have styling editors, all of them will open Shapefiles. Two that come to
mind are:
http://www.qgis.org/
http://udig.refractions.net/
There is a chance of finding SVG export in at least one of them. Quantum
GIS definitely does bitmap export.
Regarding the DBase files: "Shapefiles" are not actually files as such,
they are groups of files. The .shp file contains the actual shapes,
there is a 'prj containing the information about the geospatial
reference system and then there is a DBase file (OpenOffice can open
that), which contains the user-defined attributes for the shapes.
GeoSpatial file formats are weird. It took me a while that "Well Known
Text" is actually a name of a specified file format. The specs aren't
great either. Surprisingly support for the core formats seems to be
consistently good, though.
If you are interested in getting more into GIS, I can really recommend
PostGIS. Doing spatial unions and similar operations in SQL is probably
the most fun I had at work in recent years. And not too long ago I would
not have thought of anything SQL as fun, but when you can create new
shapes by doing unions over SQL GROUP BY groupings you suddenly can
whack out exactly the shapes you need in less than 5 minutes. The
matching picture is only a few clicks away in GeoServer.
I hope that helps a bit.
Peter
On 23/07/10 22:11, Fabrizio Giudici wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
As the subject says, I need to render some data encoded with the ESRI
format. Indeed, I'm not strictly bound to ESRI - the original data
that I can get is in ESRI, but I could pre-process it first and render
later on Android.
That's why I'm asking for a suggestion, as there are multiple options.
The straightforward one is to convert to bitmaps and I've just to find
an application (that needn't to be Java) that converts ESRI to a JPG.
But it would be nice to keep the format vectorial, such as SVG. Which
translates the question in: what vectorial format is easily renderable
on Android and can be converted from ESRI?
Thanks.
- --
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
java.net/blog/fabriziogiudici - www.tidalwave.it/people
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkxJhvsACgkQeDweFqgUGxcqRACfZ9aPUMwAplBUE3qlGRDs6F5o
90IAoKfJ/PmBGupLoe/FyM+9cqTxkSzH
=QF4/
-----END PGP SIGNATURE-----
--
You received this message because you are subscribed to the Google Groups "The Java
Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/javaposse?hl=en.