How i can transform the geometry WKB for example:
010600002031BF0D000100000001030000000100000004000000CE001744EA0212414BB26942EFE95641DD9AF00E49FF1441706072C152EC56413F53AF6BF9191441242DF04F7EC85641CE001744EA0212414BB26942EFE95641
in the same geometry with SRID 900913?
Ok, i think i found the solution, i use the next:
SELECT ST_SetSRID(st_astext(st_transform('010600002031BF0D0001000000010300000001000000050000008FEF9C07089AFEC0B90A9856E87251410F355DB1B395FEC0DCCEADDCED72514194BE3130A693FEC0DFD23127D072514114797186FA97FEC094E0C313CB7251418FEF9C07089AFEC0B90A9856E8725141'::geometry,4326)),900913)
and i seems to be working
Best Answer
If you run, using your original geometry:
you will see:
or with you second EWKT string, you get:
Both of these are already in 900913. If you look at the definition for EPSG:900913, which, note, is now called 3857, you will see your bounds are within those limits -- very large numbers, as meters covering the whole planet.
You second query seems wrong, as you are forcing this string to 4326, which it is not, and then converting it to 900913. In fact, if you wrap your query in ST_Astext, you will see that what you are getting back is not in 900913 at all.
returns:
which is almost certainly 4326, lat/lon.
As it is already in 3857 (900913), all you need to do is wrap it in ST_SetSRID, ie,
which will make the geometry you are loading have the SRID 900913 and get rid of the error message: