Hi Matthew,
I've done some work on New Zealand mapping which runs into this.
Fortunately for me, there's a NZTM projection which overlaps the 180
meridian, so what I do is transform all lat/lon points into NZTM, and then
display/process based on the NZTM coordinates.
So, perhaps you could look for a suitable CRS that covers the area from
Japan to California.
Alternatively, transform all latitude values so that they are all
positive.... if negative, add 360 to it. This will mean that Pacific
regions are all contiguous (but will mess up displaying anything that
crosses the 0th meridian).
Frank
On Thu, Mar 5, 2015 at 7:40 AM, Matthew R. Wilson <mwil...@mattwilson.org>
wrote:
> Hello,
>
> I've found a couple references to "wraparound" -- specifically in the
> JavaDocs
> as an option on RangeMeaning -- but I've not been able to find any example
> of
> how to employ it, or even if it's the right tool for the job I want to do.
>
> Specifically, I am trying to do two things. Using the Natural Earth
> countries
> shapefile, I would like to:
>
> 1) Render a map that has Japan on the left side of the image and the west
> coast
> of USA on the right side of the image, so that the map is centered on
> the
> Pacific Ocean. That is, I want the left border of my rendered image
> to be
> 125E longitude and the right border to be 120W longitude. (125.0 to
> -120.0)
>
> 2) Add features -- LineStrings, specifically -- that start at eastern
> longitudes (e.g. Japan) and end at western longitudes (e.g. USA),
> crossing
> over the "edges" of the base shapfile and wrapping around to the other
> edge
> to continue.
>
> At the moment I'm hung up on #1 before I attempt #2. Starting with the
> Quickstart tutorial, I can draw the countries shapefile on screen, and
> adapt the
> tutorial to save the rendered image to disk as a PNG file. But if I use the
> toolbar button to pan the image, there's just a sea of nothingness to the
> west
> of -180 longitude and to the east of 180 instead of the geometry repeating
> (such
> as when I pan a map with the same shapefile in GRASS).
>
> Can somebody please point me in the right direction of adapting the
> Quickstart
> tutorial (or one of the other tutorial projects if it's more appropriate)
> to
> enable the sort of wraparound behavior I'm looking for? Is it even
> possible and
> am I approaching it / talking about it in the right terms?
>
> Thank you from a complete GeoTools newbie,
> Matthew
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users