[postgis-tickets] [PostGIS] #4803: Geometry SRID does not match column SRID
    PostGIS 
    trac at osgeo.org
       
    Thu Nov 26 04:06:42 PST 2020
    
    
  
#4803: Geometry SRID does not match column SRID
---------------------+---------------------------
 Reporter:  tobwen   |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  medium   |  Milestone:  PostGIS 3.1.0
Component:  postgis  |    Version:  master
 Keywords:           |
---------------------+---------------------------
 == summary
 It's unknown if it's a bug or a feature.
 Snippet 2 works as expected, snippet 1 works in ''PostGIS v3.1alpha'', but
 throws an error in 'PostGIS v3.0':
 `ERROR:  Geometry SRID (0) does not match column SRID (3035)`
 == snippet 1
 {{{
 SELECT
     ST_MakeBox2D(
         ST_MakePoint(easting * scale, northing * scale),
         ST_MakePoint(easting * scale + width, northing * scale + width)
     )::geometry(Polygon, 3035)
 FROM
     (SELECT 1000 easting, 1000 northing, 1 scale, 100 width) sq;
 }}}
 == snippet 2
 {{{
 SELECT
     ST_SetSRID(ST_MakeBox2D(
         ST_MakePoint(easting * scale, northing * scale),
         ST_MakePoint(easting * scale + width, northing * scale + width)
     ), 3035)::geometry(Polygon, 3035)
 FROM
     (SELECT 1000 easting, 1000 northing, 1 scale, 100 width) sq;
 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4803>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
    
    
More information about the postgis-tickets
mailing list