holdenhk

Can't make imported OSM file and GeoTIFF match

Discussion created by holdenhk on May 31, 2014
Latest reply on Jun 1, 2014 by holdenhk
Hello,
I'm new to CityEngine, and although I find the video tutorials quite informative, I encountered a problem immediately after I tried to do something just slightly different from the video. Let me describe what I did step-by-step:
1. I marked a relatively small area (in Taiwan) on OSM website end exported it (coordinates: N 23.3922, S 23.3834, W 120.4022, E 120.4187).
2. I used Global Mapper 15.0 to export a GeoTIFF of that location.
    - I chose ASTER GDEM as a source, and before I clicked CONNECT, I specified 'Latitude/Longitude Bounds of Area' by copying the coordinates above. If I don't do this Global Mapper downloads the whole world, and the navigation inside it is very inconvenient.
    - after pressing the CONNECT button, a blue relief map appears and I chose EXPORT > EXPORT ELEVATION GRID FORMAT from the FILE menu.
    - I select GeoTIFF, press OK, and Export Options pop up.
    - I check Elevation 32-bit
    - I check Generate TWF file
    - I check Generate PRJ file
    - I click on Export Bounds tab and key in Lat/Lon to make sure the coordinates match again, and a yellow frame appears on the blue relief map (the area I chose is, admittedly, quite featureless, but I tried this method with some more characteristic areas, and for sure the Global Mapper picks the right spot).
    - I press OK and save the files (GeoTIFF, TWF, and PRJ).
3. I start CityEngine, create a new project and copy the four files (OSM, GeoTIFF, TWF, and PRJ) to the maps directory within this project.
    - I drag the OSM map into the viewport, tick the elements I want (practically all, as this is countryside, so there are not many details anyway), check all the boxes in the Cleanup section the tutorial suggests, and confirm "WGS 1984 UTM Zone 51N" as Scene Coordinate System.
    - I can see the road grid and a few footprints, and it is the place I marked in OSM.
    - I drag the tif elevation file into the viewport. Its name appears in Heightmap and texture files in the dialogue box. I delete the texture file, so that the box is empty. I change the elevation to 500 (the highest point in the area does not exceed 100m though), press finish and the following pop-up appears "Error: Data is located too far from current scene's contents".

I understand what it means, i.e. the two files (osm and geotiff) are too far from each other etc., but I can't understand why the programs cannot read the geo reference from the osm and prj/twf files?

The listing of twf files is as follows:
/beginning of file/
0.00029296875000005
0
0
-0.00029296875
120.40219999999999
23.3922
/end of file/
The last two values agree with the ones provided in OSM website.

The listing of the prj file is here:
/beginning of file/
GEOGCS["GCS_WGS_1984",DATUM["D_WGS84",SPHEROID["WGS84",6378137,298.257223560493]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
/end of file/

The bounds in the osm file are as follows:
/beginning of file/
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="CGImap 0.3.3 (29516 thorn-03.openstreetmap.org)" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/">
<bounds minlat="23.3834000" minlon="120.4022000" maxlat="23.3922000" maxlon="120.4187000"/>
/end of file excerpt/

If I reverse the order of dragging the files, i.e. drag the elevation first, I am requested to manually select the Scene Coordinate System, and I choose WGS 1984 UTM Northern Hemisphere Zone 51 (Taiwan is in this zone and the same zone is suggested by CityEngine when dragging the osm file first). After dragging the osm file, the same pop-up appears.

I assume I might have done something wrong while exporting the elevation, since there are no options to choose from while exporting the OSM. What do I possibly do wrong and where?

Thanks in advance,

Holden

Outcomes