Spectrum Spatial (SSA/LIM)

 View Only
Expand all | Collapse all

Black Border in SSA aerial but not in Mapinfo

  • 1.  Black Border in SSA aerial but not in Mapinfo

    Posted 09-03-2019 21:08
    Edited by Kieran McGowan 09-04-2019 00:13
    Hi All,

    Hopefully this is an easy one. I'm getting a black border/collar/edge around a 'seamless layer' in SSA(2018.2.0) when placed on top of another business map.

    Before uploading the imagery(ECW) the layers look fine in Mapinfo(17.0.3) with no black border. (see attached png)

    I'm basically putting high resolution township imagery over a rural aerial mosiac. 

    Before uploading i've added an alpha band and reprojected to EPSG:3857 to work better in SSA, then uploaded the rural and township(seamless layer) separately. I'm not sure why it looks perfect in mapinfo and not ssa so any help is appreciated.

    KR

    ------------------------------
    Kieran McGowan
    GIS Officer
    ------------------------------


  • 2.  RE: Black Border in SSA aerial but not in Mapinfo

    Posted 09-04-2019 08:22
    Is this truly a seamless table or were you just using that term generically as the image gets displayed in an tiled fashion. If this is a single image .tab file, the projection information is stored in the .tab file which may have an affine transform. That is, it may not be precisely EPSG:3857 but a slightly transformed version of that. This would be in the .tab.
    In a seamless table, that same information would be in each .tab of the seamless table.  ​

    ------------------------------
    Eric Blasenheim
    Spectrum Spatial Technical Product Manager
    Troy, NY
    ------------------------------



  • 3.  RE: Black Border in SSA aerial but not in Mapinfo

    Posted 09-04-2019 10:46
    SSA is less forgiving with projections. The base mapping will define the projection in a Project/map config.
    If you have re-projected​ your aerial imagery then the likelihood is that it is no longer "square" with the base mapping and you will get black borders.
    Try opening your imagery in MapInfo with Bing or GeoMap as a base and you should see a similar effect, if not worse!

    ------------------------------
    John Ievers
    CDR Group
    Hope Valley, United Kingdom
    ------------------------------



  • 4.  RE: Black Border in SSA aerial but not in Mapinfo

    Posted 09-04-2019 20:37
    Edited by Kieran McGowan 09-04-2019 23:34
    Thank you for the followup gentlemen.

    @Eric, yes this is a seamless layer using the following documented method to add approx 10 ecw mosaics(townships) http://support.pitneybowes.com/SearchArticles/VFP05_KnowledgeWithSidebarHowTo?id=kA1800000008a8jCAA&popup=false;&lang=en_US
    The seamless layers .tab file makes no reference of cordSys as far as i can see, however each of the 10 township .tab files show Earth Projection as shown in attached. (single_town_tab,seamless_layer_tab)

    It doesn't look like a seamless layer issue as uploading all the tabs/images individually i also see the black border. Preforming Johns test, adding bing aerial as the base layer and then the townships also looks fine in mapinfo. Projection also looks correct. (see screenshot from MI and SM)

    The ecw files for the towns were originally in GDA 94, i used FME to reproject to EPSG3857 just so that SSA would not have to do this 'on-the-fly' and impact performance.  Using the raw GDA94 imagery and leaving it to SSA to reproject works well but defeats the purpose. Perhaps my understanding is incorrect, but by adding an alpha channel to each of my township imagery before reprojecting it, the imagery remains square and the new 'empty' space is automatically considered as no data. which MI seems to identify but SSA doesn't.

    Are you saying that its not possible or at least difficult to have business maps reprojected without showing black borders?  It seems the only way i can get around this is merging the 'rural' and 'townships' into one mosiac which i was trying to avoid. my base understanding for this process is if it works in MI it should in SSA.

    ------------------------------
    Kieran McGowan
    Knowledge Community Shared Account
    Shelton CT
    ------------------------------



  • 5.  RE: Black Border in SSA aerial but not in Mapinfo

    Posted 09-05-2019 20:41
    Hi Kieran,

    I tried to do this at a client site just yesterday and had the exact same issue you are having, I believe the issue is that MapInfo uses the alpha channel in the ECW when rendering the overlapping images but Spectrum Spatial does not. I don't' think the issue has anything to do with using seamless layers (as I was not) and the projection the data is in should not matter.

    I understand that in your case the black area has been created when you reprojected the image but I would have hoped Spectrum Spatial would used the alpha channel and not shown these nodata areas.

    I'm hoping someone form PB can tell us how to enable alpha channel support in Spectrum Spatial if it is available and if not do they have plans to add support now that it is available in MapInfo Pro?

    ------------------------------
    Duri Bradshaw
    Spatial IT Consultant
    Insight GIS
    ------------------------------



  • 6.  RE: Black Border in SSA aerial but not in Mapinfo

    Posted 09-06-2019 09:28
    The image you shared showing the  coordsys clause in the tab file for the ecw is what I wanted to see.  It does look normal. Very often, raster images can have what we call an "affine" extension to the coordinate system but that does not seem to be the case here.  
    I am checking with colleagues to see who has an ecw with alpha channel to test. 
    Spatial has supported alpha channel for a very long time but because Mapinfo Pro did not support it, we did not see many examples from customers.  ECW is rendered using the  native libraries and there may be a difference there.  If you have a simple example or have sent this to support we can verify on the Spatial end. 
    Again, the Analyst application has nothing to do with this as all the rendering is handled in the underlying Spectrum Spatial services.

    ------------------------------
    Eric Blasenheim
    Spectrum Spatial Technical Product Manager
    Troy, NY
    ------------------------------



  • 7.  RE: Black Border in SSA aerial but not in Mapinfo

    Posted 09-06-2019 09:31
    One more point. If the goal here is to make a single color (black) disappear, that can be done with the transparent color option without alpha channel support.

    ------------------------------
    Eric Blasenheim
    Spectrum Spatial Technical Product Manager
    Troy, NY
    ------------------------------



  • 8.  RE: Black Border in SSA aerial but not in Mapinfo

    Posted 09-06-2019 16:22
    I did some checking and it does seem that Spatial needs to upgrade its ECW support for the alpha channel. I found an example and indeed the background displays transparently in more recent versions of MapInfo Pro but with a black background in Spatial. As I said earlier, Spatial already can support alpha channel but without a code change, processing the alpha channel information needs special handling.
    We are also considering using more of the same code that the Raster module uses in MapInfo Pro in Spatial.  We already share the code for rendering MRRs but we also do this on Linux, which is a Spatial requirement.
    Note that in MapInfo Pro, if you disable ECW handling in the Options, Raster and revert it back to the traditional raster ecw handler, MapInfo Pro renders this image with the black background.  So it definitely is working due to work that was done in that module. 
    Thanks for raising this!
    Generically, there is nothing you can do. However, you can still provide a raster override to set the transparent color. I tried this with my example but because there was real black in the image itself, those pixels became transparent and that was not desirable. This may not be the case in your images and may be a suitable workaround. 
    To try this, try the layer style in Pro and choose pick the transparent color.  If there is not other black in the image it should look fine.

    ------------------------------
    Eric Blasenheim
    Spectrum Spatial Technical Product Manager
    Troy, NY
    ------------------------------



  • 9.  RE: Black Border in SSA aerial but not in Mapinfo

    Posted 09-08-2019 19:52
    Thanks for the info Eric,

    I will have to try out some other formats and see if I can get the alpha working.

    ------------------------------
    Duri Bradshaw
    Spatial IT Consultant
    Insight GIS
    ------------------------------



  • 10.  RE: Black Border in SSA aerial but not in Mapinfo

    Posted 09-09-2019 18:53
    Edited by Kieran McGowan 09-09-2019 18:54
    Thanks for the follow up Eric. In all my testing i've been unable to find a way to make this black border the same value without losing some other data within the image itself. The black border cells vary in value from 1-15 (i think this is specific to the way ecw's are reprojected) so setting 1-15 = 0 and then using the style override on this value will remove too much. Anyway i will find an alternative way, thank you for looking into this

    ------------------------------
    Kieran McGowan
    Knowledge Community Shared Account
    Shelton CT
    ------------------------------



  • 11.  RE: Black Border in SSA aerial but not in Mapinfo

    Posted 09-10-2019 08:49
    You can convert the ecw to an mrr in the raster tool and that should preserve the alpha channel. MRR alpha is already supported by Spatial.  I hate to offer the solution of converting data but if that works for you, please go ahead.
    I have raised the ECW issue as a bug. ​

    ------------------------------
    Eric Blasenheim
    Spectrum Spatial Technical Product Manager
    Troy, NY
    ------------------------------



  • 12.  RE: Black Border in SSA aerial but not in Mapinfo

    Posted 09-15-2019 20:10
    FME is our preferred tool, but it looks like i'll have to try an alternative. https://www.safe.com/integrate/pitney-bowes-multi-resolution-raster-mrr/

    https://knowledge.safe.com/idea/28723/mrr-multiresolution-raster-format-support-in-fme.html

    We'd love to have a writer by Pitney Bowes has not made a writing SDK available. Please do lobby them as a customer -- we'd love to have writing in FME as well.


    ------------------------------
    Kieran McGowan
    Knowledge Community Shared Account
    Shelton CT
    ------------------------------



  • 13.  RE: Black Border in SSA aerial but not in Mapinfo

    Posted 06-10-2020 21:08

    I can confirm that converting the Towns to MRR in MapInfo RASTER worked for me, I have left the base imagery as an ECW as this doesn't require alpha support.

    This is a much simpler solution that building a Mosaic each time new imagery is flown as all I need to do is convert the new image to MRR add it on top of the existing map.

    Still looking forward to alpha support for ECW as this will take one step out and save me some storage space.



    ------------------------------
    Duri Bradshaw
    Spatial IT Consultant
    Insight GIS
    ------------------------------



  • 14.  RE: Black Border in SSA aerial but not in Mapinfo

    Posted 06-17-2021 20:51
    Hey Duri,

    Now that i am about to reproject our aerial again (this time from gda2020-.E3857) i wondered what approach you generally take as i have little experience as to the best method.

    From what i understand in your comment you reproject and merge all towns into a single MRR? Using this as a separate layer/business map. At the moment i've left mine to reproject on-the-fly as a seamless layer which seems to work ok. I haven't used MRR much as the writer still isnt supported in FME. The reason i wanted to mosiac both the base and towns was to deliver to other applications over WMTS, which may be to much to ask.

    Do you also reproject the base ECW? I can't seem to figure out the best way to do this..outside of reprojecting the full 40GB ecw file over the course of a weekend. I might get a better result going with the raw tiffs, i would have to do it in by grid/section because of the size, but then that leaves issues of merging those grid mosiacs(ecw) together (which i cant do as ECW doesnt support nodata).

    I had also wondered about directly populating the WMTS cache using FME WebMapTile for example but from reading the Analyst docs it seems you have to use the Tile generator.

    KR
    Kieran

    ------------------------------
    Kieran McGowan
    Corangamite Shire Council
    Camperdown VIC
    ------------------------------



  • 15.  RE: Black Border in SSA aerial but not in Mapinfo

    Posted 06-17-2021 22:13

    Hi Kieran,

    If you need it in 3857 and want to deliver via WMTS I would try the following method:

    1. Re-project the base imagery at the existing resolution
    2. Re-project each of your towns
    3. Load all the layers into Spectrum Spatial and create a map with towns on top
    4. Create a Tile based on this map
    5. Add the Tile as a WMTS service
    6. Optional - enable a tile cache

    I find this method is better than a mosaic as it means you can easily add new town as you get new imagery without having to reprocess all the data again, it also saves on disk space as you are not re-sampling your low resolution base imagery to match your high resolution towns.

    A few notes
    • You should always use the lossless TIFF rather than a compressed ECW as the source file when processing imagery.
    • You need to make sure your towns have an alpha channel and use nodata rather than having white space around the edge.
    • You can set-up a title cache which will help with performance, but you need to remember to delete it if you make changes to your map.

    Duri

    ------------------------------
    Duri Bradshaw
    Spatial IT Consultant
    Insight GIS
    ------------------------------



  • 16.  RE: Black Border in SSA aerial but not in Mapinfo

    Posted 06-17-2021 23:29
    thanks Duri - that makes complete sense, not sure why i overlooked tiling a map! which makes life a lot easier.

    ------------------------------
    Kieran McGowan
    Corangamite Shire Council
    Camperdown VIC
    ------------------------------



  • 17.  RE: Black Border in SSA aerial but not in Mapinfo

    Posted 07-26-2021 01:23
    @Eric Blasenheim, can you please provide an update on Spatials ECW alpha support and also if we're going to see an MRR writer for FME in the near future?​​

    ------------------------------
    Kieran McGowan
    Corangamite Shire Council
    Camperdown VIC
    ------------------------------