Meter to pixel scaling confusion

Hello, I am currently trying to get my unit scaling correct.

I understand that I should scale such that game objects end up between 0.1m - 10m in size to ensure that they are well behaved. However if I scale both the object dimensions as well as the position by the same factor I end up with a very large polygon skin when colliding. The scaling of the position also has an effect on the perceived speed of the objects.

So my question is, should the object dimensions and position be scaled separately or not? Sorry if the answer is obvious.
Use glViewPort and a custom projection matrix to bring everything back onto screen. Are you using OpenGL?
I am using SFML (which uses OpenGL internally) though I am not sure if I am being clear.
When it says you should scale the world I take it to mean that you need to scale the entire coordinate system (both size and position).

I grab the display values
Code:
   sf::Vector2f position = item.getPosition();
   sf::Vector2f size = item.getSize();


Code:
   b2BodyDef bodyDef;
   bodyDef.position.Set(position.x/SCALE, position.y/SCALE);

   b2PolygonShape dynamicBox;
   dynamicBox.SetAsBox(size.x/SCALE, size.y/SCALE);

When doing this I have a very large polygon skin when colliding (~20px at a scale of 15).

However when I use
Code:
   b2BodyDef bodyDef;
   bodyDef.position.Set(position.x/SCALE, position.y/SCALE);

   b2PolygonShape dynamicBox;
   dynamicBox.SetAsBox(size.x/(SCALE*2.0), size.y/(SCALE*2.0));

It works perfectly, though I do not understand why, what am I missing?
To follow on from pTymN's post...

When setting up the physics world, you are best to forget about pixels and rendering altogether. Box2D knows nothing about rendering, and dividing physics dimensions by PTM or SCALE will affect the physics behavior making the game play differently, so you will have to tune many settings all over again if you change the PTM.

It's easier to keep the physics dimensions constant and just apply scaling at the point where you actually want to render something. This way you can use the same physics world for whatever OS or screen size you eventually use, without messing up the physics behavior. This also lets you set up a more efficient physics world, by ensuring that most moving objects are in the 0.1 - 10 unit size, and you will avoid problems like the good old "why doesn't my body move faster than 2 units per time step", and having shapes so small that the linear slop becomes visible between them when stacked.

So if you have a box that you want to be 1 unit square in the physics world, you would SetAsBox(0.5, 0.5) and be done with it. It's only when it comes to rendering, that things will differ depending on what API you are using.
For example in Javascript canvas (and Android canvas too I believe), if you wanted the box to appear as 32 pixels high you would do something like:
Code:
context.save();
    context.scale(32,32);
    ... draw world here ...
context.restore();
In OpenGL you might do:
Code:
glPushMatrix();
    glScalef(32,32,1);
    ... draw world here ...
glPopMatrix();

(For an exact 32 pixel sized result with OpenGL you would also need to have the viewport set to the same dimensions as the window, with glViewport.)

Scaling at the point of rendering also lets you apply a vertical flip which might be necessary for some rendering APIs, but not for others - another reason to leave rendering transforms until you're actually rendering. I haven't been keeping up with recent developments in SFML, but there is a transform class that seems to handle this type of thing.
But why would the OP's code work, isnt it the same transformation for position and size? Why would doubling the the scaling factor for size make it work properly? Shouldnt the they be the same?
It turns out my suspicions are correct, I am stupid. They are specified has half height and half width. Sorry!

Original thread: https://box2d.org/forum/viewtopic.php?t=9124