PDA

View Full Version : Photoshop need help with map area measuring.



ukie
09-06-2013, 07:19 PM
I just wanted to figure out what is the area (miles squared) of a specific area selection on the map. The trouble is that is it not exactly a square. Does anyone know how do I figure it out are (maybe in pixels)?

Azelor
09-06-2013, 07:27 PM
if you go in window/histogram you can show the number of pixel of a selected zone. Click on the triangle with tree horizontal lines and select show statistics in the menu.

like this (I have PS CS3) : 57510

To get the size of the area you will need to find the worth of 1 pixel in miles/km depending on the scale of your map.

ukie
09-07-2013, 12:10 PM
I tried it and it makes no sense. I selected an area an it gave me 70,000 pxls then I selected as smaller portion of that area (2/3) and it gave me 150,000 pxls???? Am I doing something wrong? (I was using lasso tool)

ukie
09-07-2013, 12:15 PM
Ok got it I didn't notice the recalculation error message at first. Thanks a lot for the info!

feanaaro
02-08-2014, 10:31 AM
Sorry to resurrect this ancient thread... but... even while using un-cached data (i.e. always clicking the ! triangle) I still get weird results. For example, I select a rectanglar area, and tell it to only consider pixels in the selected layer. That gives me a number (like 70003). Then with the magic wand I subtract from the selection all the empty space in that same layer, and the same measurement becomes 59515. The selected pixels should be all and only the pixels present in that layer (or part thereof), so how it is possible that I always get different numbers?

Thanks.

Jalyha
02-08-2014, 10:40 AM
Do you have some pixels that are partially transparent?

(I don't even have the same software, but)

Sometimes mine selects *partially* opaque bits and sometimes it doesn't. The more I click add or subtract selection on the transparent, the more it adds or drops these pixels... Dunno if that helps/applies/even matters, but...

feanaaro
02-08-2014, 10:49 AM
I would not think so, it's actually all white shapes, though maybe with antialiasing... However, since I am subtracting a magic-wand selection with 0 tolerance, any pixel which is even 0.1% opaque should remain in the resulting selection (it's the buildings layer from my city map, btw). That's why I don't get it.


Edit: actually it must be antialiasing, since the discrepancy disappear by de-selecting the option in the magic wand tool. Sorry for not having noticed that myself.

Jalyha
02-08-2014, 11:07 AM
Exactly what are you doing? Like:

1) Select rectangle -> Histogram -> Adjust Settings -> Get measurement -> Deselect by magic wand -> Histogram -> Adjust Settings -> Get measurement

2) Select rectangle -> Histogram -> Adjust Settings -> Get measurement -> Select NONE -> Reselect rectangle -> Deselect by magic wand -> Histogram -> Adjust Settings -> Get measurement

Or... however you're doing it, try it the other way.

Otherwise I can only think it's first measuring the area of the whole rectangle in the selection, and with the deselect the space around it, it's measuring just the buildings, in which case the numbers *should* be different.


Or, like, it's measuring every colored square in the selection (including white shapes) and when you deselect the white, it's measuring anything else (including slightly off white, which would still be there)

And if it's not that, I don't know what the problem is... and I will shut up and wait for smart people to help you :P

Azelor
02-08-2014, 11:14 AM
I would not think so, it's actually all white shapes, though maybe with antialiasing... However, since I am subtracting a magic-wand selection with 0 tolerance, any pixel which is even 0.1% opaque should remain in the resulting selection (it's the buildings layer from my city map, btw). That's why I don't get it.


Edit: actually it must be antialiasing, since the discrepancy disappear by de-selecting the option in the magic wand tool. Sorry for not having noticed that myself.

that's not really how it works. Based on observation, opacity and colors are two very different things and magic wands only recolonize colors not transparency. So if you have a shape with a very blurry and faint surrounding, there is a good chance it get caught with the magic wand too.

If you want to select a specific area that have transparency, I think you might have to use the alpha layers...

Azelor
02-08-2014, 11:24 AM
For example, using a shape with 2 different opacities.

Add a layer mask for the shape
Select all the pixels of the shape, copy
go in the alpha layer channel and create a new alpha layer, paste

to get the amount of pixels, just use the magic wand as before (on the alpha layer with all other layers invisible) . The trick is that transparent pixels become opaque so only then you can select them.

feanaaro
02-08-2014, 11:33 AM
@Azelor: The layer only contains solid shapes 100% white. The only thing that could plausibly change whether a pixel is "counted" or not is anti-aliasing, and in fact de-selecting anti-aliasing I get a consistent count between the equivalent selections. I believe the wand selects on both color and opacity, anyway, though that is not relevant in this case.

@Jalhya: it's the first one, and I am subtracting the empty space, not the white space (which is what I want to count).

It all works fine and consistently by de-selecting anti-aliasing, really. Sorry for the induced confusion.

Ilanthar
02-16-2014, 09:13 AM
I may miss the point here (I confess I haven't read everyone's post), but I use a little free software called "ImageJ" which is quite efficient to mesure a pixel area.