Select to view content in your preferred language

Calculate length of a polygon

6814
14
11-27-2014 07:02 AM
KennethLindhardt
Deactivated User

Hi, I’m thinking of a way show me a length of a shape, and use the value I can calculate on. Maybe there is another way, and maybe this is not even possible. But this is my thought.

I’m creating an InnerRect, and I would like to the left or right side length, and the front and back length. I haven’t found anything saying that this is possible. So I thought if I split the InneRect with 1 meter in the X direction, that will give me a polygon with a geometry area of the length. Could I use that in some way to write the information to an attribute to be used for further calculation? Let’s say I want my width as well I could divide my total area with my split. I have no problem getting my length into a report. I would rather not go this way, since it will double up the polygon count, but it is the only way I can think of, getting close to what I need.   

14 Replies
DavidWasserman
Frequent Contributor

Theoretically. I have implemented gradient descent algorithm and the cost function for binary logistic regression, and I am getting to multi-class logistic regression now (neural networks fit in there). This lecture talks about classification generally.
6.1 - Classification - [ Machine Learning ] By Andrew Ng - YouTube

I would be interested to see if we could use more variables than just the slope, but the problem would largely depend on the degree of classification we want to achieve. If we just want simple roof classification this may not be that hard of a problem, but we if we want to figure out if the same building has different roof types in different locations of the building then it could be harder. I was just saying that theoretically this might be a possible application of logistic regression to classify each roof type, and then assign it to the log/foot print polygons. I thought it would be neat. 

David Wasserman, AICP
0 Kudos
ElliotHartley
Frequent Contributor

I just saw this article on the UK's National Mapping agency (Ordnance Survey) site that may interest you:

our Research team have been working on a small project to see whether it’s possible to automatically extract the shape class of each roof and whether buildings that don’t fit simple height data can be identified.

http://www.ordnancesurvey.co.uk/blog/2014/12/using-machine-learning-to-build-the-future-of-3d-mappin...http://www.ordnancesurvey.co.uk/blog/2014/12/using-machine-learning-to-build-the-future-of-3d-mappin...

All the best

Elliot

-----------------

Elliot Hartley    

Director

twitter: @elliothartley

---------------------------------

Garsdale Design Limited

elliot.hartley@garsdaledesign.co.uk

www.garsdaledesign.co.uk

0 Kudos
DavidWasserman
Frequent Contributor

Yeah in this case, I think they made the right call using clustering (unsupervised learning)...thanks for the article post. It is along the lines of what I was thinking.

David Wasserman, AICP
0 Kudos
KennethLindhardt
Deactivated User

A lot of things is going on in this thread, and I have been stuck with the companie Christmas party 😉 To make this short.

Thanks Elliot for the article, Thanks Chris and David for all the posts, and thanks for the comment Matt.

So what I did, was that I gave my points values depending on the height from each other e.g. Center point Highest = 100 Center point Not the highest, but higher than the lowest 50 points, and lowest 0 point. I did the same with left ,front, right and back points, but ass follow 10, 5, 0.

So a gable roof would get 120 point, Hip 100, flat 0, Shed 70, what I call a half_hip (half gable half hip) 110. Then I stretched the points out until it was close to overlap another roof form, in case one pint was hitting a window or something.

I took 500 building polygons and visually assigned the prober roof form to the building attributes. I then created a report in CE to see how many of the roofs I was hitting correctly. I did not choose the easy roofs for this, but I took everything where I could visually get a meaning of overwhelming roof type. (See  picture)

So here is the result:

  1. 76.91 % of the roof forms, I was calculating correct.
    Within the 76.91 % I had -
    2.06 % was marked as known issues (meaning there was too much variance between the points.

So far I’m very happy with the result. It could be fun to go the other way around, and see why I calculated some roofs wrong, but I don’t think I can get a better result procedural anyway. If I change some parameters, it will probably affect other buildings. If my building polygons, was dawned better, split’ up by year I would probably get a better result.

Capture.PNG

RickeyFight
MVP Regular Contributor

Kenneth,

I am trying to create 3d buildings for my city. I was wondering what your steps were to get the values you did.

0 Kudos