Skip to main content
Question

distance between 2 opposite building


boubcher
Contributor
Forum|alt.badge.img+11

Hello there

we looking to calculate the distance between 2 opposite buildings across a street, if we use a neighborhood finder it will not work

Any idea

Thanks

distance between building 

7 replies

DanAtSafe
Safer
Forum|alt.badge.img+18
  • Safer
  • March 26, 2022

@boubcher​ What isn't working with the NeighborFinder? Your buildings and Street center line appear to be parallel to each other.


boubcher
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • March 27, 2022
DanAtSafe wrote:

@boubcher​ What isn't working with the NeighborFinder? Your buildings and Street center line appear to be parallel to each other.

@danatsafe​  the neighborfinder is getting the adjacent building, not the opposite one, and some time the build are not parallel to the streets

Thanks


danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • March 27, 2022
boubcher wrote:

@danatsafe​  the neighborfinder is getting the adjacent building, not the opposite one, and some time the build are not parallel to the streets

Thanks

Hi @boubcher​ 

 

Please, could you share your data?

 

 

Thanks in Advance,

Danilo


boubcher
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • March 29, 2022
boubcher wrote:

@danatsafe​  the neighborfinder is getting the adjacent building, not the opposite one, and some time the build are not parallel to the streets

Thanks

@danilo_fme​ 

sure please take a look at the sample data

Thanks

 


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • March 30, 2022

Your sample buildings are quite simple, without any bulges or indentations, parallel to the street center line, and all at a uniform distance from the street center line.

Also a building is clearly opposite another building, or there is no building across the street.

And the street center line is almost straight.

 

For your sample data the following steps give you the distance between 2 opposite buildings:

  1. Determine the street facing side of each building
  2. Calculate the center point of this side
  3. Calculate the minimum distance of each center point to the street center line
  4. Create a line from each center point perpencidular to the street center line, and extend a certain distance
  5. When the end point of this line is inside a building, this is the opposite building
  6. The distance between 2 opposing buildings is the sum of their distances from the street center line

OppositesFor more complex data the procedure may also be more complex. Good luck!


boubcher
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • March 31, 2022
geomancer wrote:

Your sample buildings are quite simple, without any bulges or indentations, parallel to the street center line, and all at a uniform distance from the street center line.

Also a building is clearly opposite another building, or there is no building across the street.

And the street center line is almost straight.

 

For your sample data the following steps give you the distance between 2 opposite buildings:

  1. Determine the street facing side of each building
  2. Calculate the center point of this side
  3. Calculate the minimum distance of each center point to the street center line
  4. Create a line from each center point perpencidular to the street center line, and extend a certain distance
  5. When the end point of this line is inside a building, this is the opposite building
  6. The distance between 2 opposing buildings is the sum of their distances from the street center line

OppositesFor more complex data the procedure may also be more complex. Good luck!

@geomancer​ 

Thanks for the workspace great approach, the only problem is we don't know the buffer value in advance

what we are looking for is to calculate the street width based on the average distance between opposite buildings facing the same street segment which we don't know in advance

the approach will be applied to the entire city

The attached sample will illustrate the data better

 

 

 


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • March 31, 2022
geomancer wrote:

Your sample buildings are quite simple, without any bulges or indentations, parallel to the street center line, and all at a uniform distance from the street center line.

Also a building is clearly opposite another building, or there is no building across the street.

And the street center line is almost straight.

 

For your sample data the following steps give you the distance between 2 opposite buildings:

  1. Determine the street facing side of each building
  2. Calculate the center point of this side
  3. Calculate the minimum distance of each center point to the street center line
  4. Create a line from each center point perpencidular to the street center line, and extend a certain distance
  5. When the end point of this line is inside a building, this is the opposite building
  6. The distance between 2 opposing buildings is the sum of their distances from the street center line

OppositesFor more complex data the procedure may also be more complex. Good luck!

That is not quite the same question.

I would do something like this:

1.     Ensure your centerlines layer is topologically correct (make sure they are all connected, and have vertices on all intersections)

2.     Make polygons of the areas between the centerlines

3.     Aggregate all buildings to building blocks within these polygons

4.     Calculate all distances between the different building blocks

5.     Construct the connecting lines between the building blocks

6.     Determine which connecting lines cross which centreline

7.     For each centreline get the length of the shortest crossing line 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings