On Tue, Oct 20, 2009 at 4:42 PM, Dan Homerick <span dir="ltr"><<a href="mailto:danhomerick@gmail.com">danhomerick@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Tue, Oct 20, 2009 at 3:45 PM, Sam Vekemans<br>
<<a href="mailto:acrosscanadatrails@gmail.com">acrosscanadatrails@gmail.com</a>> wrote:<br>
</div><div class="im">> Hi,<br>
> Can you give an example of a situation when you'd need to use multiple<br>
> source fields for 1 osm tag?<br>
<br>
</div>Sure. To give a little context, the import I just did is for<br>
waterways. The source data has a boolean field NAMED that indicates<br>
whether or not a particular stream is named. There's a second field,<br>
STREAM_NAME which contains a string. When NAMED is 'Yes', then<br>
STREAM_NAME has something like 'Newell Creek' in it. When NAMED is<br>
'No', then STREAM_NAME has something like 'Stream 243' in it.<br>
<br></blockquote><br> You would think that if the named field was empty ... wouldn't the default be no?<br>... if it was me, perhaps keeping the name 'Stream 243' is a good thing. as technically, that stream is named 'Stream 243'. just like a property is named 'lot 122334' (otherwise known as "1050 Front Street". If streems were a commodity... like 'wood' then, then having the 'official number' should be kept. Perhaps i would tag it as "name:official=Stream 243"<br>
... maybe the source will get updated later on with these fields corrected. So when re-converting the shp file later on, a search can be done to find and replace those effected streams.<br><br>.... but then again, on the other hand, we are OpenStreetMap, and are NOT the "official office of the Registrar". AND Its a one-way import, where the goal is to get all the river names as human-readable and usable. (a UUID, along with the Attribution) tag would suffice.<br>
<br>... So i would recommend, that you make this compelete.osm file available somewhere on a server (whith a link to it on the wiki), and ALSO including the origional shp files, in the zip file that contains this .osm file, as well as a quick readme.txt file Would allow for other future users, to be able to cross-check the work, and perhaps re-convert the shp file, for the new version available. Then local area mappers will have a new .osm file to look at and decide what they want to add in.<br>
<br>The recommendation ALSO goes for polyshp2osm (and not just shp-to-osm that i use). :-)<br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I wanted to add a 'name' tag only for the named streams, and leave it<br>
off for the 'Stream 243' streams.<br>
<br>
So that's a case of wanting an 'IF' statement, really. An IF/ELSE<br>
would be even better, if tests for equality were available. The<br>
"polyshp2osm.py" script is wonderfully flexible since you are<br>
customizing the source code for your import. It's also useless if you<br>
don't have any exposure to programming or don't have a clue about<br>
Python. It's good to see tools like shp-to-osm which use a rules.txt<br>
file to drastically lower the bar.<br>
<div class="im"><br></div></blockquote><div>Yup, like a mac user, and a regular computer user., and those ibuntu users ..we all mappers :-) .... maybe just not understand the complex monty python humor :)<br> <br></div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
> Also, if your creating intersecting ways, double check to see that the<br>
> nodes are infact connected. (shp-to-osm doesnt connect the ways.<br>
> (thats why im not dealing with roads, and leaving it to the shp2osm<br>
> script to handle) but it seems all other features are fine though.<br>
<br>
</div>I noticed that, and used the validator plugin in JOSM to merge nodes.<br>
I was lucky that when two streams merged, they (usually) had<br>
overlapping nodes at the merge point. I'm still correcting by hand a<br>
few cases where this wasn't true, however. Also, my first attempt at<br>
uploading failed, because JOSM added a modified='true' attribute[1] to<br>
the ways when I did the merges. I used a text editor's find/replace to<br>
remove those, and the second attempt went smoothly.<br>
<br></blockquote><div>Thanks, i'll recommend people use that validator plugin, as it will certainly help.<br>... and ya, i forgot that the .osm file can be opened in notepad. and a find/replace can be done :) Thanks!<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
[1] Or something like that...<br>
<font color="#888888"><br>
- Dan<br>
</font></blockquote></div><br>Cheers,<br>Sam<br>