You are not logged in.
- Topics: Active | Unanswered
Announcement
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
#26 2012-12-26 08:52:11
- msayag
- Member

- From: Israel
- Registered: 2009-03-02
- Posts: 11
Re: New gov data source
This is really cool.
This data is collected and maintained by our money and it's nice we can make use of it.
Eric,
Can you post the script you were using?
Offline
#27 2012-12-26 09:41:40
- eric22
- Member
- Registered: 2010-07-04
- Posts: 114
Re: New gov data source
This is after exporting the XLS file to CSV, reordering the columns, doing some find/replace in the CSV to account for quotes in the street name, and deleting extra spaces/tabs in the CSV...
When exporting the CSV, I had to make sure the Hebrew encoding was correct (Unicode...)
#!/usr/bin/perl
sub trim($)
{
my $string = shift;
$string =~ s/^\s+//;
$string =~ s/\s+$//;
return $string;
}
open(SHAPES, "<c3.csv") or die ("Could not load file'\n");
open(OUT, ">out.osm") or die ("Could not open output file\n");
$count=0;
# Opening XML
print OUT "<?xml version='1.0' encoding='UTF-8'?>\n";
print OUT "<osm version='0.6' generator='addshapes.pl'>\n";
# Read/process lines
while(my $line = <SHAPES>) {
$count++;
$line =~ s/\r//g;
chomp $line;
unless($line) { next; }
my @linearray = split(/,/,$line);
@linearray[0]=~ s/\'/'/g; # Escape single quote in street name
print OUT "<node id=\"-".$count."\" lat=\"".@linearray[4]."\" lon=\"".@linearray[3]."\"><tag k='addr:street' v='".@linearray[0]."' /><tag k='addr:housenumber' v='".@linearray[1].trim(@linearray[2])."' /><tag k='source' v='Tel Aviv municipality' /><tag k='contact:website' v='http://www.tel-aviv.gov.il/OnlineServices/DataTLV/Pages/Data%20Tel-Aviv.aspx' /></node>\n";
}
# Closing XML
print OUT "</osm>\n";
close(SHAPES);
close(OUT);Then I checked and uploaded the .osm file with JOSM.
Last edited by eric22 (2012-12-26 10:29:08)
Offline
#28 2012-12-26 09:45:35
- msayag
- Member

- From: Israel
- Registered: 2009-03-02
- Posts: 11
Re: New gov data source
Cool, thanks.
I'm going to adupt this for the Tel-Ofan bicycle_rental.
Offline
#29 2012-12-26 10:05:14
- yrtimiD
- Moderator

- From: Israel
- Registered: 2010-10-08
- Posts: 265
Re: New gov data source
I'm going to adupt this for the Tel-Ofan bicycle_rental.
I asked Tel-O-Fun guys once if they want to share their database, but got no answer.
Were you more lucky?
Offline
#30 2012-12-26 10:10:41
- msayag
- Member

- From: Israel
- Registered: 2009-03-02
- Posts: 11
Re: New gov data source
msayag wrote:I'm going to adupt this for the Tel-Ofan bicycle_rental.
I asked Tel-O-Fun guys once if they want to share their database, but got no answer.
Were you more lucky?
Haven't even tried.
A list of stations, their addresses and coordinations is published under the Tel-Aviv muni data site, under the same license so I see no problen using it.
Offline
#31 2012-12-26 10:34:01
- yrtimiD
- Moderator

- From: Israel
- Registered: 2010-10-08
- Posts: 265
Re: New gov data source
A list of stations, their addresses and coordinations is published under the Tel-Aviv muni data site
Then perfect!
But we already have many of them, so need to carefully merge.
Offline
#32 2013-01-28 07:51:03
- zstadler
- Moderator
- Registered: 2012-05-05
- Posts: 381
- Website
Re: New gov data source
Great Job on the Tel-Aviv house numbers import!!!
I see that the addr:city and addr:country tags are not used.
Is this on purpose?
If so, how would a search for a popular street name, like "הרצל", select the desired city?
Offline
#33 2013-01-28 10:20:40
- Mr_Israel
- Moderator

- From: Israel, Germany
- Registered: 2009-03-02
- Posts: 513
Re: New gov data source
There is a relation for the city of Tel-Aviv Yafo that marks the border of the city.
Applications and search engines based on OSM are checking for this relations and if exist, they know the city name and country.
City relation : http://www.openstreetmap.org/browse/relation/1382494
Adding the addr:city and addr:country tag is only mandatory if there is no city relation- what is not the case in Israel.
We have very well defined city definitions all over Israel. No issue with that ![]()
Offline
#34 2013-02-02 08:24:39
- zstadler
- Moderator
- Registered: 2012-05-05
- Posts: 381
- Website
Re: New gov data source
There is a relation for the city of Tel-Aviv Yafo that marks the border of the city.
Applications and search engines based on OSM are checking for this relations and if exist, they know the city name and country.City relation : http://www.openstreetmap.org/browse/relation/1382494
Adding the addr:city and addr:country tag is only mandatory if there is no city relation- what is not the case in Israel.
We have very well defined city definitions all over Israel. No issue with that
I'd like to better understand how this can be done.
For example, is there a way to query the OSM DB for all the streets in Tel-Aviv based on this relation?
Similarly, is there a way to query the DB for items in Israel only based on its borders relations?
Offline