How to add map and charts
From Cityriskpedia
Help file for "How to add charts" will be uploaded soon
Contents |
Aim/Objective
This help tutorial will show you how to add a new map through the “Add Maps / Charts” form to cityriskpedia. It will first lead you through some steps of GIS data preparation and kml-generation. If you have already kml-files you can skip the first steps and proceed with point 5.
Preparing of Data in ArcGIS
Your GIS data has to have a defined projection. You will need to change the projection of your data to the projection of Google Earth and Google Maps to produce kml-files which can properly be overlayed. If your data has already a defined projection, you can skip point 2.1 and proceed with step 1.2.
Define Projection
The projection of your data can be defined in ArcCatalog. If the data doesn’t have a projection yet, you can define it in its Properties.
Open ArcCatalog → Right-click on name of the data → Properties. Go to “XY Coordinate Sytem”.
There it is possible to define the projection. You can either choose a predefined coordinate system or import it from an existing geodataset according to the projection in which the dataset was created.
“Select” a predefined coordinate sytem or “Import” a coordinate system.
Loading the data in ArcGIS
Open your data in ArcGIS.
Change Projection
To export the data as an kml-file and to open it in Google Earth, the initial projection has to be changed to the projection of Google Earth. This is a Simple Cylindrical coordinate system with the World Geodetic System of 1984 (WGS84) datum. Therefor you can use the ArcToolbox.
ArcToolbox →Data Management Tools →Projections and Transformations →Feature →Project
Here you can select your input dataset, can choose a name for your output dataset and select the output coordinate system.
Click “Output Coordinate System” →“Select” a predefined coordinate system →Choose “Projected Coordinate System” folder →Choose “Utm” folder →Choose “WGS 1984” folder →WGS 1984 UTM Zone xxx.prj
Here you have to find the right number of the zone appropriate to the location of your data. In our case of Istanbul it was zone 35N. It is possible that you have to choose your transformation in the Geographic Transformation box as well.
When the transformation is done, the data is ready to be exported as a kml-file.
Export to KML
Download “Export to KML” Extension
For exporting shapefiles to kml-files, you need an extension for ArcGIS, called “Export to KML”. This extension is developed by the City of Portland, Bureau of Planning. It allows ArcGIS users to export GIS data in “keyhole markup language” (KML) format for viewing in Google Earth. Any point, polyline, or polygon dataset can be exported. This is a free product and is not intended to replace the commercial KML tools available for ArcGIS. The download file can be found here http://arcscripts.esri.com/details.asp?dbid=14273. Further information for installation and adjustment can be found in the additional Export to KML documentation pdf-file.
Using the “Export to KML” Tool
The tool can be used now by clicking the appropriate toolbar. Here the layer which will be exported can be selected.
Select the layer to export →Name and location of the output KML
The layer, which will be exported, should be displayed as it is wanted in Google Earth, because the tool can use the layer’s symbology. Also an attribute for labeling the features can be selected optional. After giving a name and location to the output kml, it can be exported.
Reducing the Size of Kml-Files
There is a limitation on the filesize of the kml-files. They cannot be bigger than max 2.5MB. Otherwise they won’t show up properly. So it is good when you are able to reduce the size of your kml-files. If you don’t have a proper way to do this, the following steps will show you an alternative possibility.
Using Google Maps
As the size of kml-files generated in the way described above is generally very large, it has to be reduced. In a first step Google Maps can be used. After exporting kml-files from here the size can be reduced significantly depending on the initial size.
Sign up for a Google Account. Go to “My Maps” in Google Maps. Click “Create new map” and give it a title. Click “Import”.
Here it is possible to import kml-files into Google Maps.
The polygons will be shown in small groups you can scroll through. Here you can also change the names of your polygons or reshape them if needed.
To export the transformed kml-file,
Click on the “Link” button and copy the URL-link. Paste it in a new browser window. Add the extension “&output=kml”. Press Enter.
This will produce a new kml-file you can save and open in Google Earth.
The file size will be reduced clearly, but is still quite large. You can see the difference of the kml-files in the kml-language text when you open your result and the initial kml-file with an editor.
Using Google Earth
For further compression of the kml-file you can use Google Earth.
Open the kml-file to see it in Google Earth. Right-click on name of the file in the places list →save the place as a kml-file again.
In the editor you can see the difference again. Now you see also that the file size is much smaller than before. It is now ready to be uploaded.
Using “Add Maps / Charts” form to add new map data to cityriskpedia
Insert general information
Sign up for a new account at cityriskpedia. Log in.
Now, you can add a new map using the “Add Maps/Charts” form from the left row on www.cityriskpedia.com.
When you click save page after filling in all the boxes you will create a new wiki article where you will be lead to. There you can later edit this new page. It will also be automatically listed in the Map Gallery Table.
Click “Add Maps/Charts” →Enter to which city and to which category your map data belongs. Name your data source or reference. Upload a kmz-file.
Additionally to the kml-file you will use to create the map on the cityriskpedia page, you can insert a link to open your data in Google Earth. Displaying data through Google Maps will enable anyone accessing the wiki to see them. However, you may also want to provide a link to Google Earth which has more functionalities. As the mediawiki forms only allow kmz-files to be uploaded we request you to produce kmz-files out of your kml-files as well.
KMZ-File Generation
KMZ-files are zipped kml-files with a .kmz-extension. They feature the same content.
Single Kml to Kmz conversion
For converting a single kml-file into a kmz-file you have to zip the file.
Zip the kml-file. Change the .zip extension to .kmz.
Now it is already done. When the extensions are not shown go to Tools, Folder Options.
Untick the box “Hide extension for known file types”
(see also http://www.fileinfo.com/help/windows-show-extensions.html).
Multiple Kml to one Kmz conversion
You can also combine several kmls of one topic to one kmz-file. For this purpose you have to create NetworkLinks.
Create a folder called “nested”. In this folder create for each kml-file you want to add an extra folder. Copy in each folder one kml.
In an empty editor type (e.g. for combination of two kmls to one kmz-file):
<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" mlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> <Document> <name>doc.kml</name> <open>1</open> <NetworkLink> <name>name of first kml</name> <Link> <href>nested/name of first folder/name of first kml.kml</href> </Link> </NetworkLink> <NetworkLink> <name>name of second kml</name> <Link> <href>nested/name of second folder/name of second kml.kml</href> </Link> </NetworkLink> </Document> </kml>
Insert the correct names of your data. Save this edit called doc.kml outside of the folder nested. Now zip “doc.kml” and the folder “nested” into one zip-file. Change the .zip extension to .kmz.
Now you have created the designed kmz-file.
After uploading your kmz files you can save the page. It will lead you to your new created page.
Editing Page
Here you can start to edit your page.
Click the edit button on the top of the page.
The editor opens and you can start.
Arrange your page
With the big “A” from the available tools, insert headlines to arrange your page.
We recommend you to give a discription of your map data. It should include the original source of the map data, the year of its generation and what the data is capturing. You can also give some attribution or references and state if your data is copyrighted. You may add further information important to you as well.
When you have four or more points, the page will automatically get a Table of Contents with links to all your headlines.
Enable Google Maps Widget
To use Google Maps on a MediaWiki page, you will have to insert the following section into the edit page.
It is important to use the exactly letters especially for the key which is generated and unique for the cityriskpedia page. Please leave this part untouched to make sure your map will be showed.
“Width” and “Hight” give the size of you Google Maps window.
Lat, Long centre the position of your map. It is depending on the location of your map data. Please make sure to insert the right coordinates. The example shows the coordinates of Istanbul.
The control orders produce the typcal control bars of Google Maps.
The zoom number gives the zoom factor in which your map is shown. Try to find an appropriate zoom factor for your data.
The xml order gives the place from where your map data is loaded. The Google Maps Widget is only working with kml-files. You have to upload your kml-files to a server and add here the URL of your kml-file.
If you don’t have a server where you can upload your data to, we can host your data. We will send you the URL of your kml-file then. Please send a short mail with the subject cityriskpedia maps and with your data attached to the webmaster. The adress is info@emi_megacities.org.
To enable the Google Maps widget copy and past this text in the edit modus:
{{#widget:Google Maps
|key=ABQIAAAAMib9095Obc_hGqGSBeP8ThRpsUkRXLZ081ugskGuRWhERWCfTxRGVYuODIaQW0FUz9psc6J5VwjWAA
|width=1080
|height=430
|lat=41.01224
|lng=28.976018
|overviewmapcontrol=yes
|maptypecontrol=yes
|largemapcontrol=yes
|zoom=10
|xml=here write the URL of your map data
}}
Replace lat, long, the zoom factor and the URL appropriate to your data.
Add legends
If you want to add a legend you can upload bmp-, png- or jpg-files.
Use the toolbox, “Upload Files” command. Browse to your file, give it a destination filename and upload it.
Now insert following text with the new filename of the file. Give it a title:
[[image:name of your image.png|title of legend]]
Add links to kmz-files
You can add a link to your kmz-file, which will automatically be opened in Google Earth. As mentioned before it might be useful for others to see your data as well in Google Earth where more functionalities are provided.
Copy following text to the edit box:
[[image:name of kmz-file.kmz|Here you find the link name of kmz-file.kmz' to open this file in Google Earth]]
Insert the correct file-names.

