OpenStreetMap logo OpenStreetMap

h4ck3rm1k3's Diary

Recent diary entries

Google count for street ranking

Posted by h4ck3rm1k3 on 6 August 2009 in English.

So my idea is to use google counts for ranking the street names
there are many streets in pristina , and we should rank them!

Rr. Rexhep Luci: 743
Rr. Hajdar Dushi: 439
Rruge Hajdar Dushi: 1,140
rr 2 Korriku: 2,040
rr agim ramadani: 5,740
rr nene tereza: 7,590

This would be good project for OSM in general.
We could look for streets with the highest or lowest rankings.
Also alternative spellings.

Idea for a semantic data proxy

Posted by h4ck3rm1k3 on 5 August 2009 in English.

I had this idea while working on the osm.
The original idea was a semantic web osm interface that I wrote about before.
it is an xslt. But my idea is to place the filtering in a proxy server.
like greasemonkey for firefox, but server side.

Here are the related ideas from a chat:

how about a semantic web proxy
that you would use as the proxy server forall your web apps
but would allow for a semantic markup of all the data that passes
grddl, scraping etc
you could feed into it more data about whay you are doing
I mean a proxy server/firewall is used to serve webpages
it gets addresses and supplies data
all the browsers and webapps can be configured to one

so, if I want to make a semantic web extractor for faceboox , for example
I could do that on the proxy server
it would see that someone got a facebook page
and call the right scraper function to extract the data from it
it could even add this data into the html (rdf in html)
or add in java script funtions to display it etc

squid for example it a commonly used program

.wik proxy server
"In computer networks, a proxy server is a server (a computer system or an application program) that acts as a go-between for requests from clients seeking resources from other servers." - http://en.wikipedia.org/wiki/Proxy_server
.wik proxy server squid
"Squid is a proxy server and web cache daemon." - http://en.wikipedia.org/wiki/Squid_(software)
so an rdf proxy server that does griddle and other nice things

I mean use squid, and add in filters

the client would choose to use it
for example. if i want to get the facebook data in foaf
I can use the hypothetical facebook foaf filter
for the proxy server and then just go to the facebook page
and some scripts can be activated on the squid server

More to come.

mike

Test conversions for kosovo

Posted by h4ck3rm1k3 on 3 August 2009 in English.

here is the extract from the kosovo geodata:
7522538.4899 4743287.9845
7444008.5655 4705339.1564
7441735.2640 4710017.9238
7441225.3602 4711304.5720
7443881.5092 4711090.7286
7441994.2731 4715617.5620
7444241.5825 4713360.4177

From the end of this file:
http://www.kca-ks.org/download/report_020-033_v3_final.pdf

more here :
http://pastebin.com/m56db7289

cs2cs +ellps=GRS80 +units=m +proj=tmerc +k=0.9999 +lon_0=21 +lat_0=0 +y_0=0 -f "%.3f" < kosovopoints.src

30.097 43.437 0.000
30.380 43.315 0.000
29.990 43.478 0.000
30.823 43.122 0.000
30.898 43.088 0.000
32.051 42.591 0.000
31.318 42.905 0.000
29.828 43.543 0.000
31.403 42.868 0.000

Lets see

Bash and perl to remove referenced nodes from a delete set

Posted by h4ck3rm1k3 on 3 August 2009 in English. Last updated on 22 September 2009.

remove all the referenced nodes from kosovo:
grep ref kosova.osm | cut -d\' -f2| sort -u | grep -e [0-9]> reffed.txt

get all the deleted from my file :
grep delete test2.osm > deletes.osm

now try and run this for one hour:
grep -v -f reffed.txt deletes.osm > unreffed.osm

ok that took too long, write a perl script :
perl removereffed.pl reffed.txt deletes.osm > noreffed.osm

add the header and footer (xml) to the file
cat headerks.psm noreffed.osm footerks.osm > todo.osm

here is the perl script :
UPDATE: moved code out to :
http://bazaar.launchpad.net/~kosova/%2Bjunk/openstreetmapkosova/annotate/head%3A/CleanDelete.pl

testing in progress
osm.org/api/0.6/changeset/2027222

cs2cs magic

Posted by h4ck3rm1k3 on 3 August 2009 in English.

Iván Sánchez Ortega writes to me :
From the data I gathered from the .pdf you linked, it seems that this cs2cs
command line should be able to do the proper reprojection from KOSOVOREF1 to
WGS84:

cs2cs +ellps=GRS80 +units=m +proj=tmerc +k=0.9999 +lon_0=21 +lat_0=0 +y_0=0
+x_0=7500000 +to +init=epsg:4326

If you delve into the documentation of proj.4 and its utilities (cs2cs,
ogr2ogr, etc) you should be able to batch reproject any files you want; or
you can mail me the files and I'll reproject them for you.

I'm not an expert in projection systems, so that cs2cs command line should be
reviewed by the authors of the .pdfs you linked to, in order to get some
reassurance about it.

Cheers,
--
----------------------------------
Iván Sánchez Ortega

Merging names

Posted by h4ck3rm1k3 on 3 August 2009 in English.

Ok. My large merge of all kosovo points is running.

I have made a perl script, and of course it is checked in to bzr on launchpad, that will parse the xml node points into a multidimensional hash structure.

It is keyed by lat,long and then the keys and values

like this
$node_data{"$lat,$long"}{$keyname}=$value;

the values of the node headers are stored verbatim.
$node_data{"$lat,$long"}{"node_decl"}="xml of node header"

If i have a node header already, I append the rest to the "decldel" to be deleted.
so we have only one node per x,y coordinate.

I mean, lets say you have a spring and a town, what are the chances of the spring being in the same location of the middle of the town?

In anycase, the data is uploading.

We now have perl scripts to process all the datapoints from GSN and could add them in for other countries as well.

I still have problems with points like
farms, bridges, sheepfold and others, they need to be ways...

mike

OSM IRC bot ideas

Posted by h4ck3rm1k3 on 2 August 2009 in English.

What the bot should do :

1.where is " Placename"
2. what is near : name
3. alternative names for : name
4. coordinates convert :
5. display changeset status
6. add tags to existing node (at least produce the change xml for uploading yourself)
7. Be able to add tags, webpages and stuff to positions.
like : Wikipedia link town Prizren (link the wikipedia article to town of same name)
like : www.komuna-prizreni.org/ to Place Prizren

Here is some code:
osm.wiki/Where_Are_They

Here is an rdf bot:
http://buzzword.org.uk/2009/mttlbot/

I like phennybot
http://inamidst.com/phenny/

Hi,

I found some coordinates here, the official ones of kosovo , but they are not in standard format.
I know there must be a way to do this :

1. can you help me transform them?
2. can someone do this?

Transformation of the ETRS89 coordinates into the new Gauss-Krüger coordinate
system using program GEOREF. (File PROJNEU.PRN)

1st order network of points in KOSOVOREF01 in Kosovo.
Pt ID E N Ellips. Height Off. Height
BA01 7522538.4899 4743287.9845 689.3813 643.7452
DE01 7444008.5655 4705339.1564 566.3720 521.7577
DR01 7470424.2332 4658348.9977 1074.0462 1029.7358
FE01 7510693.7911 4691608.0842 659.6860 614.4528
FK01 7505655.2632 4721903.4453 584.7155 539.4641
GI01 7535883.9666 4702986.8964 640.0816 594.

http://www.euref-iag.net/symposia/2005Vienna/6-14.pdf
http://www.kca-ks.org/download/report_020-033_v3_final.pdf

n New KOSOVAREF01 based on EUREF
http://www.fig.net/commission7/france_2004/papers_am/ts_10_1_meha_ppt.pdf

See full entry

exception during import

Posted by h4ck3rm1k3 on 1 August 2009 in English.

I have gotten this error while uploading changes.

Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 1863
Node Kind: directory
Last Changed Author: jttt
Last Changed Rev: 1863
Last Changed Date: 2009-07-27 22:04:34 +0200 (Mon, 27 Jul 2009)

Memory Usage: 61 MB / 254 MB (29 MB allocated, but free)
Java version: 1.6.0_14

Plugins: AgPifoJPicLayerbuildings_toolsdataimportlakewalkermultipolynearclickosmarenderslippymapvalidatorwmsplugin
Plugin AgPifoJ Version: 16603
Plugin PicLayer Version: 16302
Plugin buildings_tools Version: 19
Plugin dataimport Version: 16382
Plugin lakewalker Version: 16621
Plugin multipoly Version: 16609
Plugin nearclick Version: 14015
Plugin osmarender Version: 16623
Plugin slippymap Version: 16294
Plugin validator Version: 16629
Plugin wmsplugin Version: 16599

See full entry