Opened 10 years ago

Closed 9 years ago

## #2748 closed task (fixed)

# Deprecate all functions with underscore_names rather than CamelCase

Reported by: | strk | Owned by: | strk |
---|---|---|---|

Priority: | high | Milestone: | PostGIS 2.2.0 |

Component: | postgis | Version: | master |

Keywords: | Cc: |

## Description

Spin-off of #1994, for those still not deprecated.

ST_Shift_Longitude(geometry) ST_Combine_BBox(box2d,geometry) ST_find_extent(text,text,text) RETURNS box2d AS ST_find_extent(text,text) RETURNS box2d AS ST_mem_size(geometry) ST_3DLength_spheroid(geometry, spheroid) ST_length_spheroid(geometry, spheroid) ST_length2d_spheroid(geometry, spheroid) ST_distance_spheroid(geom1 geometry, geom2 geometry,spheroid) ST_point_inside_circle(geometry,float8,float8,float8) ST_locate_between_measures(geometry, float8, float8) ST_locate_along_measure(geometry, float8) ST_Combine_BBox(box3d,geometry) ST_distance_sphere(geom1 geometry, geom2 geometry) ST_distance_sphere(geom1 geometry, geom2 geometry)

### Change History (15)

### comment:1 by , 10 years ago

Type: | defect → task |
---|---|

Version: | 2.1.x → trunk |

### comment:2 by , 10 years ago

### comment:3 by , 10 years ago

With proper formatting, leftovers:

ST_3DLength_spheroid(geometry, spheroid) ST_length_spheroid(geometry, spheroid) ST_length2d_spheroid(geometry, spheroid) ST_distance_spheroid(geom1 geometry, geom2 geometry,spheroid) ST_point_inside_circle(geometry,float8,float8,float8) ST_locate_between_measures(geometry, float8, float8) ST_locate_along_measure(geometry, float8) ST_distance_sphere(geom1 geometry, geom2 geometry) ST_distance_sphere(geom1 geometry, geom2 geometry)

### comment:4 by , 10 years ago

Done with r13173:

- ST_length_spheroid(geometry, spheroid)
- ST_distance_spheroid(geom1 geometry, geom2 geometry,spheroid)

Left over:

- ST_distance_sphere(geom1 geometry, geom2 geometry)
- ST_3DLength_spheroid(geometry, spheroid)
- ST_length2d_spheroid(geometry, spheroid)
- ST_point_inside_circle(geometry,float8,float8,float8)
- ST_locate_between_measures(geometry, float8, float8)
- ST_locate_along_measure(geometry, float8)

### comment:5 by , 10 years ago

Owner: | changed from | to
---|

### comment:6 by , 10 years ago

r13179 does ST_DistanceSphere, left over:

- ST_3DLength_spheroid(geometry, spheroid)
- ST_length2d_spheroid(geometry, spheroid)
- ST_point_inside_circle(geometry,float8,float8,float8)
- ST_locate_between_measures(geometry, float8, float8)
- ST_locate_along_measure(geometry, float8)

### comment:7 by , 10 years ago

r13192 deprecates ST_3DLength_Spheroid, left over:

- ST_length2d_spheroid(geometry, spheroid)
- ST_point_inside_circle(geometry,float8,float8,float8)
- ST_locate_between_measures(geometry, float8, float8)
- ST_locate_along_measure(geometry, float8)

### comment:8 by , 9 years ago

Priority: | medium → high |
---|

we're almost there, better not leave this half-finished

### comment:9 by , 9 years ago

The ST_Length2d_Spheroid is currently NOT DOCUMENTED. There's documentation for ST_LengthSpheroid and ST_3DLengthSpheroid, do we also need ST_2DLengthSpheroid ?

### comment:10 by , 9 years ago

r13488 deprecates ST_Point_Inside_Circle (in favor of ST_PointInsideCircle), left over:

- ST_Length2d_Spheroid(geometry,spheroid) — should it be ST_2DLengthSpheroid ? We have ST_LengthSpheroid and ST_3DLengthSpheroid
- ST_Locate_Between_Measures(geometry,float8,float8) — is already advertised as deprecated, using NOTICE (rather than WARNING). Results seem incompatible with any existing name so cannot be changed to an SQL wrapper (unless Paul knows how).
- ST_Locate_Along_MEasure(geometry,float8,float8) — is already advertised as deprecated, using NOTICE (rather than WARNING). Results seem incompatible with any existing name so cannot be changed to an SQL wrapper (unless Paul knows how).

### comment:11 by , 9 years ago

r13506 makes the deprecation of ST_Locate_Between_Measures and ST_Locate_Along_Measure closer in style to that of other deprecations. That is, is reported via WARNING (deprecation happened in 2.0.0) and explicitly states the version in which it was deprecated. It's still not done using _postgis_deprecate because behavior can be different.

So now the only left is ST_Length2d_Spheroid. Ideas on how it should be called, for consistency ? ST_LengthSpheroid does 2d or 3d based on input, ST_3DLengthSpheroid does exactly the same thing. And, actually… ST_Length2d_Spheroid also does take Z into account !!!

Proposal: deprecate all but ST_LengthSpheroid. What do you think ?

### comment:12 by , 9 years ago

Still, documentation says that ST_Length2D_Spheroid would drop the Z, but it doesn't: http://postgis.net/docs/ST_Length2D_Spheroid.html

pg21=# select ST_Length2d_Spheroid('LINESTRING(0 0 0, 0 0 1000)'::geometry, 'SPHEROID["GRS_1980",6378137,298.257222101]'); st_length2d_spheroid ---------------------- 1000 (1 row)

### comment:13 by , 9 years ago

Another documentation issue: it is not true that those functions will return 0 for anything not a linestring/multilinestring :/

### comment:14 by , 9 years ago

r13507 takes care of ST_Length2D_Spheroid, renaming it to ST_Length2DSpheroid and fixing the 2d enforcement. This ticket is completed.

### comment:15 by , 9 years ago

Resolution: | → fixed |
---|---|

Status: | new → closed |

**Note:**See TracTickets for help on using tickets.

These are deprecated with r13172:

Already deprecated with r12629 (2.2.0dev):

Left over: