PlaceNameMaker

From World Wind Wiki

Jump to: navigation, search
PlaceNameMaker
Easily add and edit placenames for World Wind
Easily add and edit placenames for World Wind
Developer Johann Zoehrer aka "canosso"
Latest release  ? / 2005-12-05
License Unspecified
Web site World Wind forums


Canosso has made a plug-in where you can easily add and edit placenames for World Wind. The Plug-in works in World Wind 1.3.2 and higher.

Contents

[edit] Installation

Please download the placenamemaker.zip, and unzip it into your World Wind directory.

The code for writing and reading the placename files is taken from the World Wind Source.

Warning Never use the PlaceNameMaker with the Place Finder of World Wind at same time. If you change a placename file the Place Finder will be stopped, you can't use it anymore and could not close it. World Wind will not be affected and after reload of World Wind the Place Finder will work correctly.

To use the plug-in load World Wind, open the Plug-Ins menu and click Load/Unload... (see figure 1).

figure 1
figure 1


Click on 'PlaceNameMaker' in the Plugin Load/Unload window and then press the Load button, the indicator next to 'PlaceNameMaker' should turn green, you can now safely close the Plugin Load/Unload window.

Afterwards choose in the Tools menu, the item PlaceName Maker. You are now in the Edit Tab., you can easily add placenames to Place names below, a table where all placenames including the coordinates and information about this place will be shown.

You can edit existing placename files but you do so at your own risk, normally a corrupt file does not affect the other files.

[edit] Add a place name simple

Go to the place where you want to add a placename, load either the form in PlaceName Maker or press in the form the button "Insert the current coordinates" to get the current coordinates. Insert the Place Name. Input Data about this place (=Country, State, State Code, County, Type, Elevation and Population) if wanted, for this point.

Press the Add to Place names button and now the placename Place names. Go to an other place and add this place if you wanted. If you have added all places, select the Save Tab, choose the at Save as ASCII, ANSI or UTF-8 Placename WWP file the Encoding format of the file and save the file. If you want to make only file and not tiled files for the whole world, this option would be the standard, save the file as 0000_0000.wwp. You will need to add information in the ^Placenames.xml or make an extra file and add a ww.wpl or copy this file from a directory with the same file structure. For adding a ww.wpl in a directory with only the 0000_0000.wwp press the Write a simple PlaceName List File button and save it. To delete the ww.idx file, needed for searching in the placenames, press Select an Index File and delete with right-click Delete.

[edit] Excursus about Place Names

At the moment, all place names are only loaded in ASCII which means a restriction to normal Roman letters but not Unicode (=UTF8). I already made an Issue (with the improved files) for this problem. I made an own build with the changed source and could load UTF8 placenames, I am sorry that too much files are involved in this change, so I will not provide any binaries. As showcase I include the file UnicodeCapitals.zip, this will not work only if you changed the source of World Wind and build it for yourself.

The place names are saved in a WWP file in a own directory for the different types. In the directory is a ww.wpl file, this file includes the list of the WWP files in the directory and there geographic limitations. If this directory was already indexed by the place finder, there is also a ww.idx file. You have to delete this file if you changed any WWP file of this directory otherwise the place finder will not find anything.

As far as I see, placenames could be changed during runtime of WW but only if the Place Finder window isn't open.

[edit] Make a Place Names directory

To add new placenames category, you need do make a directory at Data\Earth\Placenames and save there the 0000_0000.wwp file or more WWP files and ww.wpl. Delete, if existing, the ww.idx file in this directory.

Add in the file the ^Placenames.xml before <ExtendedInformation> the code snippet below with the name of the directory and the Name of PlaceName Category. Change the MaximumDisplayAltitude, if wanted After loading World Wind the placenames they will be shown.

<TiledPlacenameSet ShowAtStartup="true">
 <Name> Category </Name>
 <DistanceAboveSurface>0</DistanceAboveSurface>
 <MinimumDisplayAltitude>0</MinimumDisplayAltitude>
 <MaximumDisplayAltitude>200000</MaximumDisplayAltitude>
 <PlacenameListFilePath>Data\Earth\Placenames\ Directory \ww.wpl</PlacenameListFilePath>
 <DisplayFont>
  <Family>Arial</Family>
  <Size>8</Size>
  <Style>
   <IsBold>true</IsBold>
  </Style>
 </DisplayFont>
 <WinColorName>Pink</WinColorName>
</TiledPlacenameSet>

[edit] Insert an URI, GPX Data or DMS Coordinates

Under the Insert Coordinates Menu you'll find 3 items.

1. Insert URI, here you can past an URI in the form, World Wind will go to the coordinates, for this function is the shortcut Crtl+U available.
2. Insert a GPX Track Point, here you can past a GPX Trackpoint in the form, World Wind will go to the coordinates, for this function is the shortcut Crtl+G available.
3. Insert DMS Coordinates, here you can past DMS coordinates in the form, the coordinates should be formatted XX°XX'XX" XX°XX'XX", e.g. 37°49'35" 122°25'18" with the orientation char before or after the coordinates,World Wind will go to the coordinates, for this function is the shortcut Crtl+D available.

These are all input options.

[edit] Editing, Searching, Removing and Inserting new points

For Search in the Place names List, input the name at Search for a Place and Search for a Country, the cursor will go to this place in the DataGrid, the table, and World Wind will go to this place. Take care of pressing Enter, the cursor will be at this row and you could delete the content of this placename.

For removing the current Favorite you can use Remove Current Entry, Remove All Entries deletes all entries except the first, this one will be replaced with your input.

For Editing a placename press Edit Current Entry, the form will filled with data of this entry also World Wind will move to this place if the placename has coordinates. You can now edit this data in the form. If you press "Add to Place names ", the placename will be replaced with the data of the form, normally.

You see on the right side the Textbox "Insert Position", normally there is no number in the box, only after you press Edit Current Entry, you see a number, that is the entry number.

You can insert not replace the entry if you choose no at Replace Placename at Insert Position, if you also choose yes at Insert multiple lines you will insert all input until you choose no at this option. You can also simple input a number at "Insert Position" and choose no for the first option and yes for the second and you insert all points at the entry number, you filled in.

[edit] Moving the Place names List

For moving the current entry there are 4 options, the Arrow buttons. First choose the row you want to move and then press the button.

The ^-Button is for moving the entry up. The v-Button is for moving the entry below. The ArrowUp-Button is for moving the entry on top of the list. The ArrowDown -Button is for moving the entry on the bottom of the list.


[edit] Import Files to the Place names list

You can either import a WWP file, GPX waypoint file, a Text/CSV file, a layer file or a GEOnet Name file, the first one for editing, append and so on.

For all imported files, except WWP files, you can add the Country, State, State Code, County and Type information, this information will be added to all imported placenames.

Also you can choose, if you want to Append to Layer to the script or not. If no is checked, it has the same function like "Remove All Entries".

For a GPX file you can choose if you want to use the type, the desc or the sym Tag as Type for the placename.

For a Text/CSV File you have to change the column headers of this file. Mandatory is Latitude and Longitude and IconName. You can also have a Country, State, Codestate, County, Type, Elevation and Population column.

Please first choose how the values are separated or better in which format you saved it. The best format to use, is separated by Tabs, you will not have the problems to look in the file how it is separated. Because in countries with comma as decimal separator, the CSV file will be there separated by a semicolon. Then choose the Kind of coordinates, Decimal Point or Comma for standard coordinates or DMS for DMS coordinates, e.g. N 47°40'43" E 15°43'52".

[edit] Import GEOnet Name files

You can download at http://earth-info.nga.mil/gns/html/cntry_files.html, they are name of places including information about the type of place.

You can decide which kind of Placename you want to import, ASCII (=FULL_NAME_ND), Unicode (FULL_NAME), Capital Letters (=SORT_NAME). The Unicode names aren't real Unicode names, there aren't Chinese, Thai etc. chars.

Then you can decide, how the types will be written, Designation Code (=Abbrevations), Designation (=The type name) or WW Types (=this are the type names of the existing US Types).

Then you can choose, what kind of places, you want to import. The source designations could be found at ftp://ftp.nga.mil/pub/gns_data/Designations.html, this are sorted in different types. For the information what is included in the different types load below designate.zip or look in the source of the file. You can also select at Selected PlaceType a single Type to import.

If you don't want to import the Country Name switch to No at Use Country Name of the file.

The State Number switch is useful if you want to import only one State of the Country or want to add the State name instead of the number. First you select ADM1 first-order administrative division and choose Selected PlaceType at Kind of Places and at State Number yes. Now you will have the names of the different states with the state number in the State column. Press Copy List of PlaceNames to Clipboard and you will have the list of the States. Now select the State Number, Yes at Load only a State data and add at State the name of this state, you will have the state information added.

The import works only for country files. For the large single compressed file only a Selected PlaceType could be imported, e.g. castle, mountain, this import will take about 5 minutes and will your computer almost down.

[edit] geonettoplacenamemaker.pl

This is a Perl script for importing the single compressed file as whole and sorting the places similar to the US features. The file is even to large for Perl therefore it will be loaded first and only the needed information saved in a second file. This second file will be loaded then and tiled like the GEONET_p_ppl, there will be 4 different directories, UnicodeGEONET_p_ppl for places, world_anthropogenic, world_terrain and world_water. Total runtime 3 hours on a AMD XP 64 3200. Total size 257 MB without index files and 55 MB in zip files.

You can use this script also for smaller files, there are options for Encoding, Adding the Country name, if you want the files tiled or in one and you can also choose if you want all in a single directory or choose only one designate to import.

I included the file ^GEOnetAll.xml to geonettoplacenamemaker.zip, this file would load all the directories.

[edit] Known Problems

  • Unicode placenames aren't supported yet.
  • The single compressed GEOnet file could not be loaded as whole file, only a Selected PlaceType.
  • Sometimes imported WW placename files cannot be saved correctly. While saving an error message appears saying that the input string has the wrong format. The reason is, that the placenamemaker inserts an empty line at the beginning of the wwp file. Just delete this empty line and save. Everything should work fine now.

[edit] Files

Personal tools