Skip to main content
generalized-still fitting to answers
Source Link
Alm
  • 83
  • 5

I have a table called "gebaeude" with all types of buildings in the city. In the following I want to use a Buffer around the central train station that has the id="2" and a radius of 1000m. Then I want to select the building types "kinergarten" and "school" that are within this radius by intersecting them with the buffer. What I did looks like this:

WITH center AS (
     SELECT ST_Buffer(geom, 1000) FROM gebaeude 
     WHERE id='2')
SELECT gebaeude.name AS "Name",
        ST_Distance(center.geom, gebaeude) AS Distanz
FROM gebaeude, center
WHERE (gebaeude='school' OR gebaeude_salzburggebaeude.type='kindergarten')
AND ST_Intersects(gebaeude.geom,center.geom);

I get the following error:

ERROR: column center.geom does not exist LINE 5: ST_Distance(center.geom, gebaeude) AS Distanz ^

What am I doing wrong?

I have a table called "gebaeude" with all types of buildings in the city. In the following I want to use a Buffer around the central train station that has the id="2" and a radius of 1000m. Then I want to select the building types "kinergarten" and "school" that are within this radius by intersecting them with the buffer. What I did looks like this:

WITH center AS (
     SELECT ST_Buffer(geom, 1000) FROM gebaeude 
     WHERE id='2')
SELECT gebaeude.name AS "Name",
        ST_Distance(center.geom, gebaeude) AS Distanz
FROM gebaeude, center
WHERE (gebaeude='school' OR gebaeude_salzburg.type='kindergarten')
AND ST_Intersects(gebaeude.geom,center.geom);

I get the following error:

ERROR: column center.geom does not exist LINE 5: ST_Distance(center.geom, gebaeude) AS Distanz ^

What am I doing wrong?

I have a table called "gebaeude" with all types of buildings in the city. In the following I want to use a Buffer around the central train station that has the id="2" and a radius of 1000m. Then I want to select the building types "kinergarten" and "school" that are within this radius by intersecting them with the buffer. What I did looks like this:

WITH center AS (
     SELECT ST_Buffer(geom, 1000) FROM gebaeude 
     WHERE id='2')
SELECT gebaeude.name AS "Name",
        ST_Distance(center.geom, gebaeude) AS Distanz
FROM gebaeude, center
WHERE (gebaeude='school' OR gebaeude.type='kindergarten')
AND ST_Intersects(gebaeude.geom,center.geom);

I get the following error:

ERROR: column center.geom does not exist LINE 5: ST_Distance(center.geom, gebaeude) AS Distanz ^

What am I doing wrong?

generalized the question so that the answer still makes sense
Source Link
Alm
  • 83
  • 5

How to intersect with ST_Buffer in PostGIS

I have a table called "gebaeude_salzburg""gebaeude" with all types of buildings in the city. In the following I want to use a Buffer around the central train station that has the osm_id="159867730"id="2" and a radius of 1000m. Then I want to select the building types "school""kinergarten" and "kindergarten""school" that are within this radius by intersecting them with the buffer. What I trieddid looks like this:

WITH center AS (
     SELECT ST_Buffer(geom, 1000) FROM gebaeude_salzburggebaeude 
     WHERE osm_id='159867730'id='2')
SELECT gebaeude_salzburggebaeude.name AS "Name der Einrichtung""Name",
        ST_Distance(center.geom, gebaeude_salzburggebaeude) AS Distanz
FROM gebaeude_salzburggebaeude, center
WHERE (gebaeude_salzburg.type='school'gebaeude='school' OR gebaeude_salzburg.type='kindergarten')
AND ST_Intersects(gebaeude_salzburggebaeude.geom,center.geom);

I get the following error:

ERROR: column center.geom does not exist LINE 5: ST_Distance(center.geom, gebaeude_salzburggebaeude) AS Distanz ^

What am I doing wrong?

How to intersect with ST_Buffer in PostGIS

I have a table called "gebaeude_salzburg" with all types of buildings in the city. In the following I want to use a Buffer around the central train station that has the osm_id="159867730" and a radius of 1000m. Then I want to select the building types "school" and "kindergarten" that are within this radius by intersecting them with the buffer. What I tried looks like this:

WITH center AS (
     SELECT ST_Buffer(geom, 1000) FROM gebaeude_salzburg 
     WHERE osm_id='159867730')
SELECT gebaeude_salzburg.name AS "Name der Einrichtung",
        ST_Distance(center.geom, gebaeude_salzburg) AS Distanz
FROM gebaeude_salzburg, center
WHERE (gebaeude_salzburg.type='school' OR gebaeude_salzburg.type='kindergarten')
AND ST_Intersects(gebaeude_salzburg.geom,center.geom);

I get the following error:

ERROR: column center.geom does not exist LINE 5: ST_Distance(center.geom, gebaeude_salzburg) AS Distanz ^

What am I doing wrong?

intersect with ST_Buffer in PostGIS

I have a table called "gebaeude" with all types of buildings in the city. In the following I want to use a Buffer around the central train station that has the id="2" and a radius of 1000m. Then I want to select the building types "kinergarten" and "school" that are within this radius by intersecting them with the buffer. What I did looks like this:

WITH center AS (
     SELECT ST_Buffer(geom, 1000) FROM gebaeude 
     WHERE id='2')
SELECT gebaeude.name AS "Name",
        ST_Distance(center.geom, gebaeude) AS Distanz
FROM gebaeude, center
WHERE (gebaeude='school' OR gebaeude_salzburg.type='kindergarten')
AND ST_Intersects(gebaeude.geom,center.geom);

I get the following error:

ERROR: column center.geom does not exist LINE 5: ST_Distance(center.geom, gebaeude) AS Distanz ^

What am I doing wrong?

Rollback to Revision 2
Source Link
JGH
  • 43.1k
  • 3
  • 46
  • 93

How to intersect with ST_Buffer in PostGIS

I have a table called "gebaeude_salzburg" with all types of buildings in the city. In the following I want to use a Buffer around the central train station that has the osm_id="159867730" and a radius of 1000m. Then I want to select the building types "school" and "kindergarten" that are within this radius by intersecting them with the buffer. What I tried looks like this:

WITH center AS (
     SELECT ST_Buffer(geom, 1000) FROM gebaeude_salzburg 
     WHERE osm_id='159867730')
SELECT gebaeude_salzburg.name AS "Name der Einrichtung",
        ST_Distance(center.geom, gebaeude_salzburg) AS Distanz
FROM gebaeude_salzburg, center
WHERE (gebaeude_salzburg.type='school' OR gebaeude_salzburg.type='kindergarten')
AND ST_Intersects(gebaeude_salzburg.geom,center.geom);

I get the following error:

ERROR: column center.geom does not exist LINE 5: ST_Distance(center.geom, gebaeudegebaeude_salzburg) AS Distanz ^

What am I doing wrong?

intersect ST_Buffer in PostGIS

I get the following error:

ERROR: column center.geom does not exist LINE 5: ST_Distance(center.geom, gebaeude) AS Distanz ^

What am I doing wrong?

How to intersect with ST_Buffer in PostGIS

I have a table called "gebaeude_salzburg" with all types of buildings in the city. In the following I want to use a Buffer around the central train station that has the osm_id="159867730" and a radius of 1000m. Then I want to select the building types "school" and "kindergarten" that are within this radius by intersecting them with the buffer. What I tried looks like this:

WITH center AS (
     SELECT ST_Buffer(geom, 1000) FROM gebaeude_salzburg 
     WHERE osm_id='159867730')
SELECT gebaeude_salzburg.name AS "Name der Einrichtung",
        ST_Distance(center.geom, gebaeude_salzburg) AS Distanz
FROM gebaeude_salzburg, center
WHERE (gebaeude_salzburg.type='school' OR gebaeude_salzburg.type='kindergarten')
AND ST_Intersects(gebaeude_salzburg.geom,center.geom);

I get the following error:

ERROR: column center.geom does not exist LINE 5: ST_Distance(center.geom, gebaeude_salzburg) AS Distanz ^

What am I doing wrong?

deleted 823 characters in body; edited title
Source Link
Alm
  • 83
  • 5
Loading
naming; formatting
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65
Loading
Source Link
Alm
  • 83
  • 5
Loading