Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

252
Visualizações
input geometry has unkown(0) geometry (Although st_transform is used)

I have 2 tables:

A table with 3 fields:

id (text)
geom (geometry)

select ST_SRID(geom)
from A
where geom is not null

result: 32636

B table with 2 fields:

name (text)
geom (geometry)

select ST_SRID(geom)
from B
where geom is not null

result: 0

A.geom contains polygons

B.geom contains points

I want to get all the distances between A.id, A.geom and B.geom. I tried with:

select id, st_distance(a.geom, ST_Transform(b.geom, 32636)) as dist
from A as a, B as b
where a.geom is not null
group by id, a.geom, b.geom
order by dist desc

But I'm getting error:

"input geom has unkown(0) SRID"

How can it be if I'm using ST_Transform ?

How can I fix it ?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The error message is talking about the SRID of the argument to ST_Transform, which is 0. The message means that the function has no idea in which coordinate system the point is, so it cannot transform it to another coordinate system.

The documentation says:

ST_Transform is often confused with ST_SetSRID. ST_Transform actually changes the coordinates of a geometry from one spatial reference system to another, while ST_SetSRID() simply changes the SRID identifier of the geometry.

That seems to be the case here.

You should probably use ST_SetSRID to interpret b.geom in SRID 32636.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda