I think this has something to do with projections. By changing the extent of my WMS layer (in the plugin) i can prevent the error, though i still cant see my imagery. I have also tried adding this imagery to my WPF map with no luck. Maybe if i get the extent correct everything will work?
I have a shapefile of Tahiti (french Polynesia) in ESPG 900913 which i add to a map with a dateline wrap no problem. When i add a jp2000 image in the same projection, which lines up in Global Mapper i dont have any luck. (which makes me think my extent rectangle is incorrect)
I take the extent from a bounding box in Global Mapper. This is the one which gave me the crash in my plugin:
return new RectangleShape(-16657318.2682705, -1977400.70773863, -16599259.0555456, -2026028.99527003);
If i use the wrapping extent that i have in WPF :
return new RectangleShape(-20037508, 2725981, 20037508, -3623688);
I dont get an error but cant see any imagery. Everything (my imagery, WPF map are in EPSG 900913). I can send a downsampled version of the image if this helps. Maybe someone could tell me the extent i should be using for Tahiti and i can check if this is the problem. My PRJ file contains the following:
PROJCS["Mercator_1SP",GEOGCS["GCS_Geographic Coordinate System",DATUM["D_GOOGLE",SPHEROID["Sphere_Radius_6378137_m",6378137,0]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mercator"],PARAMETER["central_meridian",0],PARAMETER["standard_parallel_1",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]
thanks
Phil