Geo Referenced BMP

1720
4
11-22-2020 12:14 AM
YaronAvraham
New Contributor III

I'm using 100.9 runtime and found out that BMP files are not supported by Raster Layer,

Is there a simple way to open the bmp file and determine if its geo referenced?

using runtime sdk or any other way (without using external software like arcgis pro of course)

 

Thanks for any advice!

 

 

0 Kudos
4 Replies
mody_buchbinder
Occasional Contributor III

Hi Yaron

You have two different questions here.

BMP is a format that have no header or georeference info in file.

If it does not have a prj and a world file then it is have no geo reference information.

If you want to use it you must create these two files.

Second if you have local server you can use it to convert it to tiff. If the BMP have the georeference information it will be translated to the tiff.

Have Fun

0 Kudos
YaronAvraham
New Contributor III

Thanks for the answer, i only need to know if the file is georeferenced or not, so what you suggest is taking the file name and check if we have the same name with prj postfix? 

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

You could try using a KML GroundOverlay

 

e.g. `GroundOverlay_BMP.kml` references a bitmap via relative path `BMP\bmp.bmp`:

```
<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<GroundOverlay>
<name>GroundOverlay_BMP</name>
<Icon>
<href>BMP/bmp.bmp</href>
</Icon>
<LatLonBox>
<north>20</north>
<south>0</south>
<east>20</east>
<west>0</west>
<rotation>0</rotation>
</LatLonBox>
</GroundOverlay>
</kml>

```

 

Mike

0 Kudos
YaronAvraham
New Contributor III

thanks michael, i dont need to georeference the bmp file, i need to determine if the existing file is georeferenced.

with jpg files for example i load the file as raster layer and check the "SpatialReference" property if its not null, that means the file is geo referenced.

0 Kudos