PDA

View Full Version : Looking For Free Area Calc Software?!



Sigurd
06-17-2008, 09:01 AM
I've seen some time limited GIS software that allows you to easily calculate image area but I haven't been able to find a free utility...

I don't think its a hideously complicated problem to solve. I'd like to be able to import a graphic file and then draw a polygon on top of it. The program has to return the area of the polygon and probably the perimeter.

Does anyone know of a free, legal, program that will do this?

It has to allow me to trace on top of a graphics file so I can outline a feature on a map (eg. lake, island, etc....)
Units of measure is not really a problem thats a simple conversion.

It would be a useful utility for a mappers bag of tricks....



Sigurd

Redrobes
06-17-2008, 09:14 AM
If you know the area of the map in total or can cut out a rect of known area around the complicated bit then you can start with that. Then add a layer, trace around the part and fill it black and white and dump the original.

With the black and white version you can use a mega blur on it. The one I like in PSP is under Effects / Geometric Effects / Pixellate and do it as much as it will allow. Once the whole screen is one uniform gray color then get the color value and divide it by 255 and multiply by original area to give approx area of complicated shape. That should work to about 1% - 2% of actual accuracy due to errors in rounding.

Sigurd
06-17-2008, 09:25 AM
Thanks for the process I wouldn't have thought of doing it that way.

Rectangles are the easy case. Right now thats how I calculate - draw rectangle measure height, width and multiply. Complicated shapes are too,,,, complicated. I'm lazy and I'd love something simple. Right now, its not elegant.


I'd like to be able to load the graphic file in a program and simply trace shapes. Its a common enough GIS function but I am having trouble finding a free program to do it.


Sigurd


Thanks for the suggestion though.

Redrobes
06-17-2008, 09:36 AM
You can do any shape with that technique not just rects. What your doing is basically what we call a 1 bit DtoA with oversampling - digital to analogue filter and the mega blur is a huge amount of oversample. By using a mega blur that will find the average gray value for the image which is proportion of black to white ratio which is equiv to area of island to total map size. Anyway - gotta shoot off now.

ravells
06-17-2008, 10:06 AM
I think drawplus might do it and I know the early versions are free downloads - let me check and come back to you. Have you looked at inkscape? That might do it too.

Sigurd
06-17-2008, 11:39 AM
You can do any shape with that technique not just rects. What your doing is basically what we call a 1 bit DtoA with oversampling - digital to analogue filter and the mega blur is a huge amount of oversample. By using a mega blur that will find the average gray value for the image which is proportion of black to white ratio which is equiv to area of island to total map size. Anyway - gotta shoot off now.


Thanks Red, I understand and I'll try the process but I'd love something as simple as:

Trace shape(s)
Press button
Get area

Its sort of a fringe ability that becomes more useful the more easy it is to do.


Sigurd.

NeonKnight
06-17-2008, 01:59 PM
neener, neener, neener. CC3 Does exactly what you want :P

Probably because it is mapping software based off a CAD program.

Redrobes
06-17-2008, 02:20 PM
CC3 Free now huh ? :P hee hee

Seriously tho, a CAD tool or dedicated mapping app - esp a vector based one should be able to do it but its not too much of a pain to do this for any raster image and although its approximate, you might be able to get the area without any tracing which might in some cases be quite tedious - thinking of the UK coastline.

Since not everyone has CC3 and unless somebody says that there is a nice free app to do just the thing, ill do a quick tut to show how you might be able to do it. Not saying its the best way but its a way.

NeonKnight
06-17-2008, 02:48 PM
No, not really free, but if it is what you use for mapping, you don;t need to port from here to there and back again to find the info, nor does one need an add-on, it's all right there. ;)

wacko76
06-17-2008, 05:16 PM
Thanks Red, I understand and I'll try the process but I'd love something as simple as:

Trace shape(s)
Press button
Get area

Its sort of a fringe ability that becomes more useful the more easy it is to do.


Sigurd.

Hi, I just registered now, specifically to answer.

I have something even simpler than "trace, press button, get area". What about "trace, get area"?

Use Paint.NET. Open your file, use the selection tools to select the area you want to measure and at the bottom PAINT.NET tells you exactly how many square pixels you have selected. All you need now is to convert that to meters or whatever.

----------------
Now playing: George Harrison - Got my mind set on you (1987) (http://www.foxytunes.com/artist/george+harrison/track/got+my+mind+set+on+you+(1987))
via FoxyTunes (http://www.foxytunes.com/signatunes/)

Redrobes
06-17-2008, 05:34 PM
Ah well that sounds like a perfect solution. I knew there must be something about like that.

Welcome Wacko. Another lurker plucked from the far reaches of obscurity :)

Edit -- Actually, I gotta ask - why do people want to do this sort of thing anyway ? I don't think I have ever felt the need to know areas. I guess for gaming you might want an area of effect spell...

ravells
06-17-2008, 06:07 PM
Bah, drawplus just gives you the dimensions of the rectangle enclosing the shape.

RobA
06-17-2008, 07:43 PM
Wow-

I feel like a schmuck now. I answered in the other thread that the GIMP histogram has a Mean value display without noticing it also has a pixel count of the image (or current selection):

4414

Using the sample image in the other thread and selecting the white with the colour select tool and a 1 px feather gives 165557/(1024*1024)=15.78%

-Rob A>

Redrobes
06-17-2008, 07:55 PM
Argh - look at this - without even selecting it, if you stick your cursor on the histo for the whole image at the half way point ( 128 ) then it even reads it out for you as 15.8% OMG. So its ridiculously easy to get at it. So basically, read it off and multiply by the total area and thats the island area.

Sigurd
06-17-2008, 08:07 PM
Thanks so much for the pointer to Paint.net. Its just the thing!



Edit -- Actually, I gotta ask - why do people want to do this sort of thing anyway ? I don't think I have ever felt the need to know areas. I guess for gaming you might want an area of effect spell...

My take on the June contest has been to use the map data to generate more history\story. To that end, I've been trying to develop existing story threads and experiment with demographics and random generation.


Area calculation is not a common tool but it is a useful tool for a mapper - hence the request. GIS systems use it to count the percentage of various elements, say forest vs grassland, in a region.

Its not big in Fantasy maps cause its a little bookish but hey, I am trying to learn here. :). And I could never justify the cost of some GIS systems that offer it out of the box.


Sigurd

RobA
06-17-2008, 08:14 PM
Argh - look at this - without even selecting it, if you stick your cursor on the histo for the whole image at the half way point ( 128 ) then it even reads it out for you as 15.8% OMG. So its ridiculously easy to get at it. So basically, read it off and multiply by the total area and thats the island area.

Thanks redrobes! I tried it in gimp and it does too, except instead of clicking in the histogram you drag to select a range and it tells you the percentage (15.8 here as well).

-Rob A>

Midgardsormr
06-17-2008, 09:00 PM
Edit -- Actually, I gotta ask - why do people want to do this sort of thing anyway ? I don't think I have ever felt the need to know areas. I guess for gaming you might want an area of effect spell...

I can think of an application for my current Mapping Challenge entry, actually. I am currently wondering how much farmland I need to support my little village. Once I figure out how many people can be supported per square mile (probably around 80, given the terrain and available technology), I'll need to know what the area of my irregularly-shaped plots is so that I can determine how many more such plots I need to paint in.

Sigurd
06-17-2008, 09:08 PM
The paint.net solution is damn near perfect. The easier it is the more useful it is - with due reverence to redrobes, we seem to have found a number of easy ways.

One of the really great opportunities of having a map to work from is discovering what really 'looks right'. I'm so used to having the idea first and the map second that this is a special challenge.

To me its central to the second level of the world building project.


Sigurd


Repping whacko76 for rushing in to save the day.

He has the highest percentage of solved problems per post on the entire board! (at least for now :) )

jfrazierjr
06-17-2008, 10:31 PM
Hi, I just registered now, specifically to answer.

Use Paint.NET. Open your file, use the selection tools to select the area you want to measure and at the bottom PAINT.NET tells you exactly how many square pixels you have selected. All you need now is to convert that to meters or whatever.




Sooo... now how about posting up some maps from Paint.NET? I downloaded it the other day just to play around, and some of the fairly easy things from GIMP I was not able to figure out how to do in it. I think it would be nice to see what kind of stuff can make out of it without to much work.

Joe

Sigurd
06-18-2008, 01:34 AM
Sounds like a great idea. Paint.net looks like a nice interface and its very fast on my machine (low resources I think) It definitely compares to other free graphic packages.

Only problem is I'm content to let it be a one trick pony - I'll measure area in it and, at least initially, keep using my other software.

Sigurd.

Doesn't mean I don't appreciate the one trick pony :).

wacko76
06-18-2008, 03:50 PM
Sooo... now how about posting up some maps from Paint.NET? I downloaded it the other day just to play around, and some of the fairly easy things from GIMP I was not able to figure out how to do in it. I think it would be nice to see what kind of stuff can make out of it without to much work.

Joe

Ahem, well, I'm not that big an artist. Mainly using CC3, and that stuff looks still crappy. I prefer Paint.NET over GIMP simply because I never got the hang of the GIMP GUI. Not having one window to rule them all, one window to find them, one window to bring them all and in usability bind them is difficult to get used to.

isomage
12-12-2008, 08:33 PM
A GIMP plugin:
http://www.cartographersguild.com/showthread.php?t=3681