From: Lewis, J. J (DNR) <jer...@al...> - 2010-04-16 19:44:37
|
Hello all, I'm having some problems reprojecting the MapContext. Specifically, the WMS layers are grabbed and put into the GraphicEnhancedMapContext, but they are in WGS84. For them to work correctly with Google, they need to be in Google Mercator. After the ReferencedEnvelope is done being created in the map's CRS, the map is sent to a StreamingRenderer and the image is sent out to savedimage1.jpg. After the first image is created, the Google Mercator CRS is created from the WKT created by Andrea, back in '08. The old ReferenceEnvelope and the new CRS are passed into CRS.transform(), spitting out an Envelope that is used to created the new ReferenceEnvelope. The new CRS is set into the GraphicEnhancedMapContext, and the new map and ReferenceEnvelope are sent into a new StreamingRenderer to be sent into saveimage2.jpg The problem is that the two images are identical. When a given layer is looked at with both projections via different calls to the GeoServer, there is a noticeable difference. However, for some odd reason the second image looks like the first, the one created under WGS84. If you would like, I could send in the code, but this is the basics of it. As there's not a whole lot of this type of problem being expressed in the mailing lists, I'm not even sure I'm doing this correctly. The CRS Lab would help with the features that I'm drawing on the map, but does nothing for the WMS layers. Any help would be appreciated, Jeremiah _____________________________________ Jeremiah Lewis Programmer Intern, GIS Programming Unit Dept. of Natural Resources, IRM Section 550 West 7th Ave., Suite 706 Anchorage, AK 99501 (907)269-8863 E-mail:Jer...@al... |