ThinkGeo.com    |     Documentation    |     Premium Support

Jpeg2000RasterLayer - Does not Display

MapSuite Team,

For the first time I am attempting to implement Jpeg2000RasterLayer, but the raster will not display. I attempted this with both V9.0.0.190 and V9.0.408.0.

Are there newer unmanaged DLL’s required for jpeg2000?

The jp2’s to display range in size from 1.5GB to 16GB.

My code snippet is attached.

Your thoughts/suggestions?

Thanks,
Dennis

CodeSnippetJPeg2000RasterLayer.txt (1.8 KB)

Hi Dennis,

I tested your code, which works well.

  wpfMap1.MapUnit = GeographyUnit.Meter;
        Jpeg2000RasterLayer layer = new Jpeg2000RasterLayer(@"D:\MapData\special format\jpg2000\World.jp2");
        //JPeg2000Layer.PathFilename = ThePath;

        layer.Open();            
        //TheHasBoundingBox = layer.HasBoundingBox;
        //TheHasProjectionText = layer.HasProjectionText;

        LayerOverlay TheOverlayRaster = new LayerOverlay();
        TheOverlayRaster.TileBuffer = 1;
        TheOverlayRaster.TileWidth = 512;
        TheOverlayRaster.TileHeight = 512;

        TheOverlayRaster.Layers.Add(layer);

        wpfMap1.CurrentExtent = layer.GetBoundingBox();
        //layer.IsVisible = true;
        //layer.Close();
        wpfMap1.CenterAt(wpfMap1.CurrentExtent.GetCenterPoint());

        wpfMap1.ZoomTo(wpfMap1.CurrentExtent.GetCenterPoint(), wpfMap1.ZoomLevelSet.ZoomLevel20.Scale);
        wpfMap1.Overlays.Add(TheOverlayRaster);
        wpfMap1.Refresh();

As below is the latest unmanaged package: https://ap.thinkgeo.com:5001/sharing/sKCiOH19f

Wish that’s helpful.

Regards,

Don

hi Don,

If this works for you, but not me I’m guessing there is a mismatch between the DLL’s you are using and the one’s I’m using. On a test machine I installed the latest unmanaged package and it actually broke all my MrSid & TIF functionality and did not solve the JPeg2000 problem. I’m compiling my application with V9.0.408.0 and the latest unmanaged package is V9.0.308.0. Are these compatible?

Can you tell me specifically what DLL’s are required to display JPeg2000 images?

Thanks,
Dennis

Hi Dennis,

Don is out of the office today, I viewed your code and found the ‘TheOverlayRaster’ has not been added to the map.
Please add the following code after " TheOverlayRaster.Layers.Add(JPeg2000Layer);":

wpfMap1.Overlays.Add(TheOverlayRaster);

By the way, I used the V9.0.408.0 (Map Suite) and V9.0.380.0(Unmanaged Dependencies).

Wish that’s helpful.

Thanks,
Emil.

Emil,

Thanks for spotting the missing line as it is required. However, now I receive the following exception:

External component has thrown an exception.

This occurs when I attempt to Open the jp2 file. The files associated with the jp2 file are shown below. Are these the correct files that are required?

01/21/2016 04:11 PM 1,591,516,322 Cook_21_2014.jp2
01/21/2016 04:42 PM 20,141 Cook_21_2014.jp2.aux.xml
01/21/2016 04:34 PM 298,658,089 Cook_21_2014.jp2.ovr
01/21/2016 04:42 PM 10,360 Cook_21_2014.jp2.xml

This is on a Windows-7 machine. My application is compiled with V9.0.408.0 and I installed V9.0.380.0 Unmanaged Dependencies.

I would appreciate it if you would tell me exactly what MapSuite DLL’s are required for this. And if you would provide a link to them in a zip file (not an msi file) that would be greatly appreciated.

I have also created a ‘raster catalog’ in order to deal with multiple jp2 with one later within my application. When I attempt to Draw that layer I receive the exception as detailed in the attached text file.

Assistance on this greatly appreciated.

Regards,
Dennis
ExceptionFromJPeg2000Draw20160831.txt (7.7 KB)

Regards,
Dennis

Hi Dennis,

Your files is enough, the .jp2 is mainly file, and the .ovr should be a 3D file, it won’t be called in our product.

Our developer had viewed your exception information, it looks we don’t have more idea about that. So could you please upload your jp2 file into our FTP, then our developer can try to dubug it. You can get the account from your sales.

Regards,

Don

hi Don,

My JPeg2000 Rasters are good because they display properly with ESRI ArcGIS.

Would you please send me all the DLL’s that are used specifically for JPeg2000 so I know I am using the proper set of MapSuite DLL’s? I prefer you send them in a zip file as opposed to an msi so that I know exactly what they are and can install them where I need them. I would appreciate that.

Have your DLL’s been tested under both Win-7 and Win-10?

Thanks,
Dennis

Hi Dennis,

Because we support some raster layers via 3rd part dlls, so we need you data to help test. That’s maybe not because your data is broken, that’s maybe the format hadn’t be support correct.

I think you have get the latest dlls, if you want to get a zip package, please download it here:

The GeoRaster x86 and x64 should be placed in the folder like C:\Windows\SysWOW64\Map Suite 9.0

https://ap.thinkgeo.com:5001/sharing/K73MTIVj9

Wish that’s helpful.

Regards,

Don

Don,

I will get one of my JPeg2000 images downloaded to my area on your server so you can test it.

I will also download the link you provided and make sure I am using the same DLL’s you are using.

Thanks very much.
Dennis

Don,

I looked at the DLL’s from the download and they don’t make any difference, I continue to get the same symptoms.

Dennis

Hi Dennis,

It looks you had upload the data succeed.

I found your Cook_21_2014.jp2 under MapRasters2014 folder.

I will let our developer know that and test with it.

Regards,

Don

Don,

I uploaded a few more JP2 rasters so you’ll have more to work with.

Dennis

Hi Dennis,

Sorry for the delay. I tested with the file “Cook_21_2014.jp2” and got the exception with “System.AccessViolationException”. I’m not sure if it’s the issue you encountered, because I don’t see the Exception in the log you attached.

Our developers are still working on it. Any updates will be updated here.

Sorry for any inconvenience.

Thanks,
Peter

Peter,

I also received the System.AccessViolationException as well, the exceptions were different I believe on Windows-7 and Windows-10.

Dennis

Hi Dennis,

I get news from our developer. The format of file “Cook_21_2014.jp2” is multi-bands which is not supported in Map Suite now (The Map Suite can support the image with format RGB now). It will take one and a half week to support it. The time is beyond the post support and ticket support, and you can contact the sales to get a professional service if it’s ok for you.

Thanks,
Peter

Peter,

Is jp2 with multi-bands supported in Map Suite WMS Server Edition?

Thanks,
Dennis

Hi Dennis,

I’m sorry to say that the WMS Server Edition also doesn’t support this format. You can try using other tools to convert this format to the supported format. Also, we can try converting it to the supported format, if it’s OK for you.

Thanks,
Peter

hi Peter,

Thanks for the update. If you would convert the files I uploaded to RGB that would be appreciated. I could then make sure I can display them. I actually have about 25 other JP2’s that total 400GB so I might look for a tool to convert them. I may ask my sales rep the cost for you to support multi-band.

Thanks,
Dennis

Hi Dennis,

Very sorry to say we were failed to convert the file to the “RGB” format, but you can use the 3rd editor to do it, such as Global Mapper.

Thanks,
Peter

Dennis,

We have implemented support for multi-bands, high color depth imagery, you can download the upgrade patch from here.

Please note that this upgrade requires update dependencies files in windows system folder, so you may get a security warning when you install it on Windows 10. And you can you can keep using your current MapSuite DLLs, and even keep using your current binary without recompile if you want.

Since we are working on MapSuite 10 release right now and this upgrade haven’t been included in current MapSuite 9.0 daily build yet. You may need to manually install this patch onto each individual computer runs your application.

Thanks,
Jack