Skip to main content

In google maps, I want to use map.getBounds() and take those values and query my PostGIS instance for all line segments that intersect that range. I am doing something wrong. I am tryingtried:

SELECT * FROM pipeline_denorm WHERE pipeline_denorm.wkb_geometry && ST_Transform(ST_MakeEnvelope(-121.76986352563478, 37.85809027719253, -121.19308129907228, 38.07462286323802, 4326), 2223);

SELECT * FROM pipeline_denorm
WHERE pipeline_denorm.wkb_geometry &&
ST_Transform(
    ST_MakeEnvelope(
        -121.76986352563478, 37.85809027719253, 
        -121.19308129907228, 38.07462286323802, 4326), 
    2223);

based on a little research. Unfortunately no results are being returned and I am certain there is data that should be being returned. These are LineStrings. Basically want any record that contains a point within the bounding box.

In google maps, I want to use map.getBounds() and take those values and query my PostGIS instance for all line segments that intersect that range. I am doing something wrong. I am trying

SELECT * FROM pipeline_denorm WHERE pipeline_denorm.wkb_geometry && ST_Transform(ST_MakeEnvelope(-121.76986352563478, 37.85809027719253, -121.19308129907228, 38.07462286323802, 4326), 2223);

based on a little research. Unfortunately no results are being returned and I am certain there is data that should be being returned. These are LineStrings. Basically want any record that contains a point within the bounding box.

In google maps, I want to use map.getBounds() and take those values and query my PostGIS instance for all line segments that intersect that range. I am doing something wrong. I tried:

SELECT * FROM pipeline_denorm
WHERE pipeline_denorm.wkb_geometry &&
ST_Transform(
    ST_MakeEnvelope(
        -121.76986352563478, 37.85809027719253, 
        -121.19308129907228, 38.07462286323802, 4326), 
    2223);

based on a little research. Unfortunately no results are being returned and I am certain there is data that should be being returned. These are LineStrings. Basically want any record that contains a point within the bounding box.

Question is asking about line segments rather than point geometeries.
Source Link

How can I query a geometry field in PostGIS for pointsline segments within a given lat/long bounding box?

In google maps, I want to use map.getBounds() and take those values and query my PostGIS instance for all points withinline segments that intersect that range. I am doing something wrong. I am trying

SELECT * FROM pipeline_denorm WHERE pipeline_denorm.wkb_geometry && ST_Transform(ST_MakeEnvelope(-121.76986352563478, 37.85809027719253, -121.19308129907228, 38.07462286323802, 4326), 2223);

based on a little research. Unfortunately no results are being returned and I am certain there is data that should be being returned. These are LineStrings. Basically want any record that contains a point within the bounding box.

How can I query a geometry field in PostGIS for points within a given lat/long?

In google maps, I want to use map.getBounds() and take those values and query my PostGIS instance for all points within that range. I am doing something wrong. I am trying

SELECT * FROM pipeline_denorm WHERE pipeline_denorm.wkb_geometry && ST_Transform(ST_MakeEnvelope(-121.76986352563478, 37.85809027719253, -121.19308129907228, 38.07462286323802, 4326), 2223);

based on a little research. Unfortunately no results are being returned and I am certain there is data that should be being returned. These are LineStrings. Basically want any record that contains a point within the bounding box.

How can I query a geometry field in PostGIS for line segments within a given lat/long bounding box?

In google maps, I want to use map.getBounds() and take those values and query my PostGIS instance for all line segments that intersect that range. I am doing something wrong. I am trying

SELECT * FROM pipeline_denorm WHERE pipeline_denorm.wkb_geometry && ST_Transform(ST_MakeEnvelope(-121.76986352563478, 37.85809027719253, -121.19308129907228, 38.07462286323802, 4326), 2223);

based on a little research. Unfortunately no results are being returned and I am certain there is data that should be being returned. These are LineStrings. Basically want any record that contains a point within the bounding box.

Source Link

How can I query a geometry field in PostGIS for points within a given lat/long?

In google maps, I want to use map.getBounds() and take those values and query my PostGIS instance for all points within that range. I am doing something wrong. I am trying

SELECT * FROM pipeline_denorm WHERE pipeline_denorm.wkb_geometry && ST_Transform(ST_MakeEnvelope(-121.76986352563478, 37.85809027719253, -121.19308129907228, 38.07462286323802, 4326), 2223);

based on a little research. Unfortunately no results are being returned and I am certain there is data that should be being returned. These are LineStrings. Basically want any record that contains a point within the bounding box.