Re: [Talk-ca] Building Import update

2019-01-28 Thread Yaro Shkvorets
Hey Nate,
I've also looked into it and came across this paper:
https://www.josis.org/index.php/josis/article/view/276/166
Sounds like what we need.
IMO this is the kind of stuff that needs to be dealt with in JOSM on a
per-square basis rather than modifying original data. So you have control
over the result and can possibly tweak it in the process if there are any
issues. I've looked into plugins and found only "Building Generalization"
plugin (
https://wiki.openstreetmap.org/wiki/JOSM/Plugins/Building_Generalization)
that is supposed to be able to fix this kind of problem. However, after
running it on an area from Texas import with 90% of problematic buildings,
it turns out to be doing pretty bad job: https://i.imgur.com/P5mbjRf.jpg




On Mon, Jan 28, 2019 at 10:08 AM Nate Wessel  wrote:

> Hi all,
>
> I was reading about orthogonalization yesterday and came across this
> paper...
>
>
> https://icaci.org/files/documents/ICC_proceedings/ICC2009/html/refer/19_2.pdf
>
> ...which describes an algorithm that seems to quite effectively disregard
> angles that are not close to orthogonal while straightening those that are.
> I added a link to it in the wiki. This may not be implemented in JOSM, but
> there's no reason we couldn't pre-process the data in this way.
>
> From Pierre's analysis, it sounds to me like we really do need to consider
> orthogonalizing buildings where possible, which should be pretty much all
> buildings (I could see some buildings sharing nodes getting complicated).
> Once the angles are corrected, I imagine we should be able to simplify with
> a very small threshold and get good results.
>
> Given the number of buildings in this import, this is absolutely something
> worth doing. Four million buildings times one tiny problem equals one
> really huge problem. Let's fix it now while it's still relatively easy.
>
> Best,
> Nate Wessel
> Jack of all trades, Master of Geography, PhD candidate in Urban Planning
> NateWessel.com 
>
> On 1/28/19 9:17 AM, john whelan wrote:
>
> Interesting, although I'm not sure what the best approach is.
>
> 31 Hamilton is interesting.  If you look at the buildings next to it they
> don't have house numbers.  Look at the history and you'll see it was first
> created in 2010 with potlatch and edited once more in 2011.
>
> At my first glance at Kingston the small deviations form 90 degrees did
> not stand out.
>
> I think we can reasonably expect Microsoft to create a Canadian buildings
> file and you seem to be comfortable that the ones it has in the US are of a
> reasonable standard.
>
> Part of my background is large databases and my personal view is the
> minimum data needed the faster the system runs and less data needs to get
> flipped round and backed up.
>
> Could you run the analysis over Ottawa?
>
> Looking closely at a few in Ottawa I note that there are some bay windows
> and other small features I might not have bothered with if mapping with
> JOSM with the buildings_tool. Because of a few 45 degree angles involved
> this isn't something that can be easily solved.
>
> Ottawa I think at some level can be considered a reasonable success.
> Certainly we added a lot of extra information to the building outlines.
>
> I think the trade off is using the municipal data gives us the buildings
> with perhaps more detail than I might like but many would like to see the
> buildings imported.
>
> Dunno (Do not know for translate tools.)
>
> What is the ideal building outline in OpenStreetMap?
>
> What is an acceptable building outline in OpenStreetMap?
>
> Suggestions
>
> Thanks
>
> Cheerio John
>
> On Sun, 27 Jan 2019 at 23:28, Pierre Béland  wrote:
>
>> Bonjour John
>>
>> La géométrie des bâtiments est un sujet qui préoccupe plusieurs
>> contributeurs en particulier pour les imports de données. Dans un tel cas,
>> il est difficile de revenir en arrière et il est préférable de bien
>> planifier, analyser.  Comme on le voit avec l'import en Ontario, on observe
>> qu'il est possible de s'assurer que les données soient orthogonales et que
>> les noeuds inutiles soient éliminées.
>>
>> En comparaision les données  Microsoft importées à Arlington, au Texas
>> présentent des géométries plus standard.  À première vue, les ratios de
>> géométrie irrégulières semblent beaucoup plus bas.
>>
>> Une nouvelle analyse pour l'Ontario, cette fois-ci pour les données
>> importées dans la zone Oshawa-Hamilton montre 62% sont des polygones avec
>> des formes irrégulières.
>>
>> A noter que pour déterminer les polygones réguliers, j'utilise un spectre
>> de degrés assez large
>> - lignes droites entre 178 et 182 degrés
>> - angles droits entre 88 et 92 degrés, entre 268 et 272
>> - autres types de polygones : variation de +-2.2% vs angle moyen pour le
>> polygone (octogones, hexagones, etc)
>>
>> Dans les analyses de géométrie, un grand nombre de polygones classés
>> FB_oo ont des géométries où on retrouve des batiments presque orthogonaux
>> mais avec un ou 

Re: [Talk-ca] Building Import update

2019-01-28 Thread Pierre Béland via Talk-ca
Ok John,
je vais lancer le script pour Ottawa. Mais je dois régler petit soucis 
d'instabilité  windows avec java et osmosis.  Ne peut mettre a jour java. Et 
powershell refuse parfois de reconnaitre commandes exe.

Parmi tous les scripts de conversion de raster / vectoriel, il serait oui 
intéressant de trouver un script opensource qui corrige les problèmes 
d'orthogonalisation. 

Un défi supplémentaire, lorsque des batiments adjacents partagent des lignes de 
contour. Dans JOSM, lorsque je vois de telles situations, je traite si possible 
en bloc tous les batiments et réoriente ensuite si nécessaire pour mieux 
correspondre à l'imagerie.

 
Pierre 
 

Le lundi 28 janvier 2019 09 h 17 min 37 s HNE, john whelan 
 a écrit :  
 
 Interesting, although I'm not sure what the best approach is.  
31 Hamilton is interesting.  If you look at the buildings next to it they don't 
have house numbers.  Look at the history and you'll see it was first created in 
2010 with potlatch and edited once more in 2011.
At my first glance at Kingston the small deviations form 90 degrees did not 
stand out. 
I think we can reasonably expect Microsoft to create a Canadian buildings file 
and you seem to be comfortable that the ones it has in the US are of a 
reasonable standard.
Part of my background is large databases and my personal view is the minimum 
data needed the faster the system runs and less data needs to get flipped round 
and backed up.
Could you run the analysis over Ottawa?
Looking closely at a few in Ottawa I note that there are some bay windows and 
other small features I might not have bothered with if mapping with JOSM with 
the buildings_tool. Because of a few 45 degree angles involved this isn't 
something that can be easily solved.
Ottawa I think at some level can be considered a reasonable success.  Certainly 
we added a lot of extra information to the building outlines.
I think the trade off is using the municipal data gives us the buildings with 
perhaps more detail than I might like but many would like to see the buildings 
imported.
Dunno (Do not know for translate tools.)
What is the ideal building outline in OpenStreetMap?
What is an acceptable building outline in OpenStreetMap?  

Suggestions
Thanks
Cheerio John
On Sun, 27 Jan 2019 at 23:28, Pierre Béland  wrote:

Bonjour John
La géométrie des bâtiments est un sujet qui préoccupe plusieurs contributeurs 
en particulier pour les imports de données. Dans un tel cas, il est difficile 
de revenir en arrière et il est préférable de bien planifier, analyser.  Comme 
on le voit avec l'import en Ontario, on observe qu'il est possible de s'assurer 
que les données soient orthogonales et que les noeuds inutiles soient éliminées.
En comparaision les données  Microsoft importées à Arlington, au Texas 
présentent des géométries plus standard.  À première vue, les ratios de 
géométrie irrégulières semblent beaucoup plus bas. 

Une nouvelle analyse pour l'Ontario, cette fois-ci pour les données importées 
dans la zone Oshawa-Hamilton montre 62% sont des polygones avec des formes 
irrégulières.
A noter que pour déterminer les polygones réguliers, j'utilise un spectre de 
degrés assez large 
- lignes droites entre 178 et 182 degrés
- angles droits entre 88 et 92 degrés, entre 268 et 272
- autres types de polygones : variation de +-2.2% vs angle moyen pour le 
polygone (octogones, hexagones, etc)
Dans les analyses de géométrie, un grand nombre de polygones classés FB_oo ont 
des géométries où on retrouve des batiments presque orthogonaux mais avec un ou 
des angles entre 86 et 94 degrés. Cela veut sans doute représenter des angles 
droits mais l'écart est assez grand. Dois-t-on se satisfaire de cela? 
En ce qui a trait aux normes de qualité, elle sont généralement implicites et 
guidées par les outils disponiibles. Avec JOSM, on s'attend généralement qu'un 
contributeur utilisera le greffon Building et saura tracer des batiments 
rectangulaires et si nécessaire superposer plusieurs formes rectangulaires 
légérement décalées et les joindre en un seul polygone.  Les contributeurs 
devraient normalement aussi maitriser les notions de perspective lorsque 
l'image est prise avec un certain angle par rapport à la verticale.  Les outils 
d'intelligence artificielle aussi ?

Selon toi, quelles règles devrait-on appliquer pour évaluer la géométrie des 
bâtiments ?
L'exemple de géométrie que tu as présenté, on le retrouve effectivement 
beaucoup dans les imports pour l'Ontario. Ce bâtiment n'est pas dans mon 
fichier par ce que le contributeur n'était pas répertorié dans le projet 
http://tasks.osmcanada.ca/project/145. Je n'ai retenu que les contributeurs qui 
y apparaissait.
Pour des exemples similaires contenus dans le fichier d'analyse, regardes près 
du 31 Hamilton 
street.https://www.openstreetmap.org/#map=20/44.23749975223997/-76.49539748034509
  
Ce polygone contient 22 angles, des quasi lignes droites (symbole ir), et des 
quasi 90 degrés (oo) et des angles 

Re: [Talk-ca] Building Import update

2019-01-28 Thread Yaro Shkvorets
As far as I know Texas has been using 2 sources for their buildings
imports.

   1. Microsoft, (example:
   https://www.openstreetmap.org/#map=18/32.74517/-97.14334) Even in
   suburbs (that are supposed to be easy for their AI), buildings lack any
   details and sometimes are not even aligned with the roads.
   https://i.imgur.com/eWroYZB.png Some that are in the shades are even
   missing: https://i.imgur.com/8SF3sS4.jpg I can only imagine what it
   looks like downtown. Sure they don't get flagged with "almost square
   angles" but that's pretty much the only thing they have going for them.
   2. OrthoTexas. Much better details but the first place I look, vast
   majority buildings do not have square angles:
   https://www.openstreetmap.org/#map=19/32.97102/-96.78231 Probably even
   worse than in Ontario.

Compared to both of those sources, StatsCan data is much more detailed and
is better aligned with the imagery and surroundings.
If we are so determined to map for the Validator (which I'm not sure is the
right OSM approach) we should fix StatsCan data. I remember there was a
standard JOSM warning for "almost square angles" with autofix a year ago or
so. Does anyone know what happened to it?


On Mon, Jan 28, 2019 at 9:20 AM john whelan  wrote:

> Interesting, although I'm not sure what the best approach is.
>
> 31 Hamilton is interesting.  If you look at the buildings next to it they
> don't have house numbers.  Look at the history and you'll see it was first
> created in 2010 with potlatch and edited once more in 2011.
>
> At my first glance at Kingston the small deviations form 90 degrees did
> not stand out.
>
> I think we can reasonably expect Microsoft to create a Canadian buildings
> file and you seem to be comfortable that the ones it has in the US are of a
> reasonable standard.
>
> Part of my background is large databases and my personal view is the
> minimum data needed the faster the system runs and less data needs to get
> flipped round and backed up.
>
> Could you run the analysis over Ottawa?
>
> Looking closely at a few in Ottawa I note that there are some bay windows
> and other small features I might not have bothered with if mapping with
> JOSM with the buildings_tool. Because of a few 45 degree angles involved
> this isn't something that can be easily solved.
>
> Ottawa I think at some level can be considered a reasonable success.
> Certainly we added a lot of extra information to the building outlines.
>
> I think the trade off is using the municipal data gives us the buildings
> with perhaps more detail than I might like but many would like to see the
> buildings imported.
>
> Dunno (Do not know for translate tools.)
>
> What is the ideal building outline in OpenStreetMap?
>
> What is an acceptable building outline in OpenStreetMap?
>
> Suggestions
>
> Thanks
>
> Cheerio John
>
> On Sun, 27 Jan 2019 at 23:28, Pierre Béland  wrote:
>
>> Bonjour John
>>
>> La géométrie des bâtiments est un sujet qui préoccupe plusieurs
>> contributeurs en particulier pour les imports de données. Dans un tel cas,
>> il est difficile de revenir en arrière et il est préférable de bien
>> planifier, analyser.  Comme on le voit avec l'import en Ontario, on observe
>> qu'il est possible de s'assurer que les données soient orthogonales et que
>> les noeuds inutiles soient éliminées.
>>
>> En comparaision les données  Microsoft importées à Arlington, au Texas
>> présentent des géométries plus standard.  À première vue, les ratios de
>> géométrie irrégulières semblent beaucoup plus bas.
>>
>> Une nouvelle analyse pour l'Ontario, cette fois-ci pour les données
>> importées dans la zone Oshawa-Hamilton montre 62% sont des polygones avec
>> des formes irrégulières.
>>
>> A noter que pour déterminer les polygones réguliers, j'utilise un spectre
>> de degrés assez large
>> - lignes droites entre 178 et 182 degrés
>> - angles droits entre 88 et 92 degrés, entre 268 et 272
>> - autres types de polygones : variation de +-2.2% vs angle moyen pour le
>> polygone (octogones, hexagones, etc)
>>
>> Dans les analyses de géométrie, un grand nombre de polygones classés
>> FB_oo ont des géométries où on retrouve des batiments presque orthogonaux
>> mais avec un ou des angles entre 86 et 94 degrés. Cela veut sans doute
>> représenter des angles droits mais l'écart est assez grand. Dois-t-on se
>> satisfaire de cela?
>>
>> En ce qui a trait aux normes de qualité, elle sont généralement
>> implicites et guidées par les outils disponiibles. Avec JOSM, on s'attend
>> généralement qu'un contributeur utilisera le greffon Building et saura
>> tracer des batiments rectangulaires et si nécessaire superposer plusieurs
>> formes rectangulaires légérement décalées et les joindre en un seul
>> polygone.  Les contributeurs devraient normalement aussi maitriser les
>> notions de perspective lorsque l'image est prise avec un certain angle par
>> rapport à la verticale.  Les outils d'intelligence artificielle aussi ?
>>
>> Selon toi, 

Re: [Talk-ca] Building Import update

2019-01-28 Thread Nate Wessel

Hi all,

I was reading about orthogonalization yesterday and came across this 
paper...


https://icaci.org/files/documents/ICC_proceedings/ICC2009/html/refer/19_2.pdf

...which describes an algorithm that seems to quite effectively 
disregard angles that are not close to orthogonal while straightening 
those that are. I added a link to it in the wiki. This may not be 
implemented in JOSM, but there's no reason we couldn't pre-process the 
data in this way.


From Pierre's analysis, it sounds to me like we really do need to 
consider orthogonalizing buildings where possible, which should be 
pretty much all buildings (I could see some buildings sharing nodes 
getting complicated). Once the angles are corrected, I imagine we should 
be able to simplify with a very small threshold and get good results.


Given the number of buildings in this import, this is absolutely 
something worth doing. Four million buildings times one tiny problem 
equals one really huge problem. Let's fix it now while it's still 
relatively easy.


Best,

Nate Wessel
Jack of all trades, Master of Geography, PhD candidate in Urban Planning
NateWessel.com 

On 1/28/19 9:17 AM, john whelan wrote:

Interesting, although I'm not sure what the best approach is.

31 Hamilton is interesting.  If you look at the buildings next to it 
they don't have house numbers.  Look at the history and you'll see it 
was first created in 2010 with potlatch and edited once more in 2011.


At my first glance at Kingston the small deviations form 90 degrees 
did not stand out.


I think we can reasonably expect Microsoft to create a Canadian 
buildings file and you seem to be comfortable that the ones it has in 
the US are of a reasonable standard.


Part of my background is large databases and my personal view is the 
minimum data needed the faster the system runs and less data needs to 
get flipped round and backed up.


Could you run the analysis over Ottawa?

Looking closely at a few in Ottawa I note that there are some bay 
windows and other small features I might not have bothered with if 
mapping with JOSM with the buildings_tool. Because of a few 45 degree 
angles involved this isn't something that can be easily solved.


Ottawa I think at some level can be considered a reasonable success. 
Certainly we added a lot of extra information to the building outlines.


I think the trade off is using the municipal data gives us the 
buildings with perhaps more detail than I might like but many would 
like to see the buildings imported.


Dunno (Do not know for translate tools.)

What is the ideal building outline in OpenStreetMap?

What is an acceptable building outline in OpenStreetMap?

Suggestions

Thanks

Cheerio John

On Sun, 27 Jan 2019 at 23:28, Pierre Béland > wrote:


Bonjour John

La géométrie des bâtiments est un sujet qui préoccupe plusieurs
contributeurs en particulier pour les imports de données. Dans un
tel cas, il est difficile de revenir en arrière et il est
préférable de bien planifier, analyser.  Comme on le voit avec
l'import en Ontario, on observe qu'il est possible de s'assurer
que les données soient orthogonales et que les noeuds inutiles
soient éliminées.

En comparaision les données  Microsoft importées à Arlington, au
Texas présentent des géométries plus standard.  À première vue,
les ratios de géométrie irrégulières semblent beaucoup plus bas.

Une nouvelle analyse pour l'Ontario, cette fois-ci pour les
données importées dans la zone Oshawa-Hamilton montre 62% sont des
polygones avec des formes irrégulières.

A noter que pour déterminer les polygones réguliers, j'utilise un
spectre de degrés assez large
- lignes droites entre 178 et 182 degrés
- angles droits entre 88 et 92 degrés, entre 268 et 272
- autres types de polygones : variation de +-2.2% vs angle moyen
pour le polygone (octogones, hexagones, etc)

Dans les analyses de géométrie, un grand nombre de polygones
classés FB_oo ont des géométries où on retrouve des batiments
presque orthogonaux mais avec un ou des angles entre 86 et 94
degrés. Cela veut sans doute représenter des angles droits mais
l'écart est assez grand. Dois-t-on se satisfaire de cela?

En ce qui a trait aux normes de qualité, elle sont généralement
implicites et guidées par les outils disponiibles. Avec JOSM, on
s'attend généralement qu'un contributeur utilisera le greffon
Building et saura tracer des batiments rectangulaires et si
nécessaire superposer plusieurs formes rectangulaires légérement
décalées et les joindre en un seul polygone. Les contributeurs
devraient normalement aussi maitriser les notions de perspective
lorsque l'image est prise avec un certain angle par rapport à la
verticale.  Les outils d'intelligence artificielle aussi ?

Selon toi, quelles règles devrait-on appliquer pour évaluer la
géométrie 

Re: [Talk-ca] Building Import update

2019-01-28 Thread john whelan
Interesting, although I'm not sure what the best approach is.

31 Hamilton is interesting.  If you look at the buildings next to it they
don't have house numbers.  Look at the history and you'll see it was first
created in 2010 with potlatch and edited once more in 2011.

At my first glance at Kingston the small deviations form 90 degrees did not
stand out.

I think we can reasonably expect Microsoft to create a Canadian buildings
file and you seem to be comfortable that the ones it has in the US are of a
reasonable standard.

Part of my background is large databases and my personal view is the
minimum data needed the faster the system runs and less data needs to get
flipped round and backed up.

Could you run the analysis over Ottawa?

Looking closely at a few in Ottawa I note that there are some bay windows
and other small features I might not have bothered with if mapping with
JOSM with the buildings_tool. Because of a few 45 degree angles involved
this isn't something that can be easily solved.

Ottawa I think at some level can be considered a reasonable success.
Certainly we added a lot of extra information to the building outlines.

I think the trade off is using the municipal data gives us the buildings
with perhaps more detail than I might like but many would like to see the
buildings imported.

Dunno (Do not know for translate tools.)

What is the ideal building outline in OpenStreetMap?

What is an acceptable building outline in OpenStreetMap?

Suggestions

Thanks

Cheerio John

On Sun, 27 Jan 2019 at 23:28, Pierre Béland  wrote:

> Bonjour John
>
> La géométrie des bâtiments est un sujet qui préoccupe plusieurs
> contributeurs en particulier pour les imports de données. Dans un tel cas,
> il est difficile de revenir en arrière et il est préférable de bien
> planifier, analyser.  Comme on le voit avec l'import en Ontario, on observe
> qu'il est possible de s'assurer que les données soient orthogonales et que
> les noeuds inutiles soient éliminées.
>
> En comparaision les données  Microsoft importées à Arlington, au Texas
> présentent des géométries plus standard.  À première vue, les ratios de
> géométrie irrégulières semblent beaucoup plus bas.
>
> Une nouvelle analyse pour l'Ontario, cette fois-ci pour les données
> importées dans la zone Oshawa-Hamilton montre 62% sont des polygones avec
> des formes irrégulières.
>
> A noter que pour déterminer les polygones réguliers, j'utilise un spectre
> de degrés assez large
> - lignes droites entre 178 et 182 degrés
> - angles droits entre 88 et 92 degrés, entre 268 et 272
> - autres types de polygones : variation de +-2.2% vs angle moyen pour le
> polygone (octogones, hexagones, etc)
>
> Dans les analyses de géométrie, un grand nombre de polygones classés FB_oo
> ont des géométries où on retrouve des batiments presque orthogonaux mais
> avec un ou des angles entre 86 et 94 degrés. Cela veut sans doute
> représenter des angles droits mais l'écart est assez grand. Dois-t-on se
> satisfaire de cela?
>
> En ce qui a trait aux normes de qualité, elle sont généralement implicites
> et guidées par les outils disponiibles. Avec JOSM, on s'attend généralement
> qu'un contributeur utilisera le greffon Building et saura tracer des
> batiments rectangulaires et si nécessaire superposer plusieurs formes
> rectangulaires légérement décalées et les joindre en un seul polygone.  Les
> contributeurs devraient normalement aussi maitriser les notions de
> perspective lorsque l'image est prise avec un certain angle par rapport à
> la verticale.  Les outils d'intelligence artificielle aussi ?
>
> Selon toi, quelles règles devrait-on appliquer pour évaluer la géométrie
> des bâtiments ?
>
> L'exemple de géométrie que tu as présenté, on le retrouve effectivement
> beaucoup dans les imports pour l'Ontario. Ce bâtiment n'est pas dans mon
> fichier par ce que le contributeur n'était pas répertorié dans le projet
> http://tasks.osmcanada.ca/project/145. Je n'ai retenu que les
> contributeurs qui y apparaissait.
>
> Pour des exemples similaires contenus dans le fichier d'analyse, regardes
> près du 31 Hamilton street.
> https://www.openstreetmap.org/#map=20/44.23749975223997/-76.49539748034509
>
>
> Ce polygone contient 22 angles, des quasi lignes droites (symbole ir), et
> des quasi 90 degrés (oo) et des angles irréguliers tles 98,8, 94,3
> Est-ce un polygone irrégulier ou un effet de perspective? Comment le
> représenter?
> "59879471""22""FB_irreg"
>  "{o,o,o,o,ir,ir,ir,ir,oo,o,o,oo,oo,ir,oo,o,oo,rr,ir,ir,o,o}"
>  
> "{90.6,90.7,89.3,89.2,95.4,94.8,178,83.2,86.1,90.9,89.2,94,93.6,94.3,93.1,89.9,93.8,171.2,98.8,94.3,90.9,89.9}"
>
> Angle 177,6 presque droit, noeud inutile - normalement un simple rectangle
> "657790097""5""FB_irreg""{o,o,ir,o,o}"
>  "{90,91,177.6,91.4,90}"
>
>
> Un peu d'humour la-dessus. Un robot trace un rectangle parfait. Un premier
> contributeur le voit et dit cela ne semble pas normal et y ajoute un peu de
> distorsion. Un deuxième 

[Talk-ca] hebdoOSM Nº 444 2019-01-15-2019-01-21

2019-01-28 Thread theweekly . osm
Bonjour,

Le résumé hebdomadaire n° 444 de l'actualité OpenStreetMap vient de paraître 
*en français*. Un condensé à retrouver sur :

http://www.weeklyosm.eu/fr/archives/11389/

Bonne lecture !

hebdoOSM ? 
Qui : https://wiki.openstreetmap.org/wiki/WeeklyOSM#Available_Languages 
Où : 
https://umap.openstreetmap.fr/en/map/weeklyosm-is-currently-produced-in_56718#2/8.6/108.3
___
Talk-ca mailing list
Talk-ca@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-ca