Manifold Community Site: Looking best workflow or solution for Manifold 8 or Radian Studiohttp://www.georeference.org/forum/t138165Manifold Community Site threadhttp://www.georeference.org/forum/images/img-logo.pngManifold Community Site: Looking best workflow or solution for Manifold 8 or Radian Studiohttp://www.georeference.org/forum/t138165RE: Looking best workflow or solution for Manifold 8 or Radian Studiohttp://www.georeference.org/forum/t138165#138166<P><SPAN>I'm looking for the best solution and workflow for Manifold 8 or Radian Studio!</SPAN></P><P><SPAN>.</SPAN></P><P><SPAN>I have about 6000 polygons which representing building zones. Also have all the buildings by their type of building. There are 85 different types of buildings. (See picture).</SPAN></P><P><SPAN>As a result I need to get a table where I will have summation data by polygons zone about:</SPAN></P><P><SPAN>- </SPAN><SPAN>number of objects of a certain type</SPAN></P><P><SPAN>- </SPAN><SPAN>total area of these objects</SPAN></P><P><SPAN><SPAN>- </SPAN></SPAN><SPAN>total area of all objects</SPAN></P><P><SPAN>-</SPAN><SPAN>calc (area of the zone / total area of all objects).</SPAN></P><P><SPAN>In addition to this information, I need data on the percentage of a certain type of objects in the total number of objects per that zone, and the share of the sum of the surface of a certain type of object in the total area of all objects in that zone).</SPAN></P><P><SPAN>Which is the best scenario? </SPAN></P><P><SPAN>Is it possible to write a script for Manifold 8 or Radian?</SPAN></P><P><SPAN>Is there anything that already exists?</SPAN></P><P><SPAN>The data I'm talking about are in SHP files.</SPAN></P><p class='file'><b>Attachments:</b><br><a href='e42362F3133383136362F5A6F6E6530312E706E67/Zone01.png'><img src='images/dwn-ftp.gif' align='absmiddle'></a> <a href='e42362F3133383136362F5A6F6E6530312E706E67/Zone01.png'>Zone01.png</a><br></p>CuDomagojhttp://www.georeference.org/forum/t138165#138166http://www.georeference.org/forum/t138165#138166Thu, 07 Sep 2017 11:15:38 GMTRE: Looking best workflow or solution for Manifold 8 or Radian Studiohttp://www.georeference.org/forum/t138165#138212<P>All of the above is easily done with queries, either in Manifold 8 or in Radian.</P><P>Ie, number of objects of a certain type is just:</P><P class='code'><span class=c>--SQL</span></P><P class='code'><span class=k>SELECT</span> type, Count(*) <span class=k>FROM</span> buildings <span class=k>GROUP</span> <span class=k>BY</span> (type)</P><P>Applying "but I want to know the number of objects of a certain type not just in general, but for each polygon" adds a second table and some conditions, possibly written as a join. Ie:</P><P class='code'><span class=c>--SQL</span></P><P class='code'><span class=k>SELECT</span> zones.name, buildings.type, Count(buildings.ID)</P><P class='code'><span class=k>FROM</span> buildings <span class=k>INNER</span> <span class=k>JOIN</span> zones <span class=k>ON</span> Touches(zones.ID, buildings.ID)</P><P class='code'><span class=k>GROUP</span> <span class=k>BY</span> zones.name, buildings.type</P><P>(The above queries are for Manifold 8, but only because I could make them more likely to work on random data by referring to the ID field. Queries for Radian are very similar.)</P><P>Have you used SQL before? If so, just dive right in, launch Radian, import / link your data, then open a command window and start writing queries, you are going to feel at home. If not, here is the starter help topic for Radian: <A HREF='http://manifold.net/doc/radian/queries.htm'>Basics - Queries</A>. There are plenty of resources teaching SQL on the web, and there is some initial time investment, but (a) it isn't big, what you are asking to do is pretty basic and does not go into the complex areas of SQL, and (b) it is very worthwhile, SQL is a very powerful tool used everywhere, not just in Manifold / Radian.</P><P>If you have issues figuring out how to compute anything specific, post an example file and the queries you tried and someone will help you.</P><P>You can also do the above using scripts, but SQL is simply easier, it has been designed to do what you are asking for.</P>adamwhttp://www.georeference.org/forum/t138165#138212http://www.georeference.org/forum/t138165#138212Sun, 10 Sep 2017 08:05:15 GMTRE: Looking best workflow or solution for Manifold 8 or Radian Studiohttp://www.georeference.org/forum/t138165#138293<P>Thanks a lot!<IMG class='cons' id='i138293x0_elt' onclick="showhideImageElt('i138293x0_elt')" SRC='images/emo-smile.gif'></P>CuDomagojhttp://www.georeference.org/forum/t138165#138293http://www.georeference.org/forum/t138165#138293Wed, 13 Sep 2017 14:33:41 GMT