[Proj4j] Question About Valid CRS Identifiers To Get Started With GUI Development

Martin Davis mtnclimb at gmail.com
Mon Feb 8 11:56:39 EST 2010


Landon,

Your note contains lots of subthreads!  Here goes with my thoughts:

* CRS IDs - the PROJ4 archive of CRSes is in the /nad directory, in
various files called "epsg", "esri", etc.  I'm taking the file name as
the Authority code.  Each file contains comments, and CRS definitions
which look like:

<id> proj4 spec string

So createFromName takes a CRS name which looks like eg "EPSG:1234" and
looks up that CRS in the EPSG file.  (I will add all this to the
javadoc...)

Now, the current file parser just extracts a single CRS from the file.
 It does parse the entire file tho, so could easily be extended to
extract all of them.

One thing that would be VERY nice is to be able to capture the CRS
descriptions which are typically in the comment immediately before the
CRS spec.  This should be a fairly simply amendment to the parser.

* I agree with your proposed design for the UI - that's pretty much
what I was thinking too.  Shapefile support would be great, and it
makes sense to use the GeoTools code.  I was also thinking of
providing a text box to allow a user to directly enter a coordinate,
too.

* The MetaCRS test parser is pretty much done.  Have a look at
MetaCRSTestCmd. java.

* One thing that would be nifty is if the GUI would also accept a
MetaCRS test file, and run all the tests in it.  Something like the
JUnit runner in Eclipse.  A nice display of all tests and their status
would be great.

This could even turn into a full-blown MetaCRS test file editor...  !
That wouild be a great tool to promote the concept.

* I'm still keen on reviving Jerry's great visual display of
coordinate projections on a world map.  I did ask for the code, but
haven't got anything so far.  Shouldn't be too hard to reproduce it
though.

Martin


On Fri, Feb 5, 2010 at 4:05 PM, Sunburned Surveyor
<sunburned.surveyor at gmail.com> wrote:
> Martin,
>
> I was looking over the example code you sent me a few weeks ago. This
> led me to a question that I want to ask about Proj4J. The answers will
> help me get started with the GUI development.
>
> I see that we pass the CoordinateSystemFactory.createFromName method
> some type of identifier to obtain a coordinate system. Is there a
> mechanism within Proj4J that I can use to obtain a list of valid
> identifiers? I know this information may be embedded in some text
> files or configuration files. That is fine. I can write a parser if
> needed to obtain the list if you can point me in the correct place to
> look. I want to present the user with a list box of valid CRS
> identifiers. (Actually, I will need two (2) list boxes. One will be
> for the source CRS and one will be for the desination CRS.)
>
> Once I get this figured out, I think the rest will come together
> without too much of your help. I think I will need to build some
> wrapper layers that extract ProjCoordinate objects from feature
> geometries stored in a Shapefile. I imagine transformation of
> Shapefiles will be our typical use case. Of course, people could want
> to transform spatial data from other sources too, but I want to get
> something working with Shapefiles first.
>
> So it looks like I will have to layers to implement. One will be the
> actual GUI, the second will be a layer that reads and writes
> ProjCoordinate objects from feature geometries in different formats,
> like ESRI shapefiles. I'm thinking I will tap the GeoTools library for
> Shapefile support at this point.
>
> Let me know what your thoughts are on this.
>
> It may take me a few weeks to get a working GUI for Shapefile
> conversion. After this is done I will work on the parser for the
> MetaCRS test data.
>
> The Sunburned Surveyor
> _______________________________________________
> Proj4j mailing list
> Proj4j at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/proj4j
>


More information about the Proj4j mailing list