Ticket #151 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

[wktraster] rt_ prefixes brake seemless integration

Reported by: pracine Owned by: pracine
Priority: medium Milestone: WKTRaster 0.1.6
Component: raster Version: trunk
Keywords: Cc: mloskot

Description

We must rename every function with the RT_ prefix with a ST_ prefix to ensure seemless integration with PostGIS geometry functions.

Change History

  Changed 4 years ago by mloskot

  • milestone 1.4.1 deleted

Pierre,

Are you going to update function names in rtpostgis.sql or you want me to do it?

  Changed 4 years ago by pracine

  • owner changed from pierre to pracine
  • reporter changed from pierre to pracine
  • summary changed from rt_ prefix brake WKT Raster seemless integration to rt_ prefixes brake WKT Raster seemless integration
  • milestone set to wktraster 0.1.6

  Changed 4 years ago by pracine

  • status changed from new to assigned

  Changed 4 years ago by pracine

  • status changed from assigned to closed
  • resolution set to fixed

  Changed 4 years ago by mloskot

  • status changed from closed to reopened
  • resolution fixed deleted

Is it intentional that rt_lib_version() function has been renamed to st_lib_version() ? I believe this name is unclear and ambiguous, so I've reopened the ticket.

  Changed 4 years ago by pracine

Would postgis_raster_lib_version() & postgis_raster_lib_build_date() be better?

PostGIS names his own ones postgis_lib_version() & postgis_lib_build_date()

  Changed 4 years ago by mloskot

Works for me. It just need to be unambiguous name.

  Changed 4 years ago by pracine

  • status changed from reopened to closed
  • resolution set to fixed

  Changed 4 years ago by mloskot

Fixed by Pierre in r4146

I'd suggest to take care of two details while resolving tickets:

  • Include ticket number in log message:
    svn ci -m "Fixed bug ... (#151)
    

what tells Trac to replace #151 with link to ticket 151 wherever log message is displayed.

  • Include revision number of resolving changeset in ticket's comment, while closing a ticket. Example of comment:
    Fixed in trunk (r4146)
    

what tells Trac to replace r4146 with link to changeset.

It saves a lot of time to find out what has changed, who fixed what and how it's been fixed.

  Changed 4 years ago by mloskot

Updated regression tests runner (r4148)

  Changed 4 years ago by robe

Guys I just realized a possibly small problem with using ST_ prefix. While writing book and complaining about why relying on autocasts is bad and you should explictly use ST_GeomFromText or CAST or what have you. It occurred to me that the downside of using ST_ for Raster, is that you can never declare a Text auto cast for it.

Auto casts I think are bad anyway. The point though --

In Postgis -- you can do this ST_Intersects('POINT(....)', 'LINESTRING(...)');

and PostgreSQL will happily cast both to geometry because there is an auto cast in place.

However if you introduced an auto cast that takes WKT Raster text representation --> RASTER -- it will break everything.

So I guess the point is if you plan to create CASTS that convert text to RASTER -- make sure they are not declared automatic -- otherwise it would cause an ambiguous function name error thingy.

follow-up: ↓ 13   Changed 4 years ago by pracine

Thanks for the warning. I'm happy it is not a too big problem. We won't implement automatic CAST from text...

in reply to: ↑ 12   Changed 4 years ago by mloskot

Regina,

Good point. I support Pierre's proposal.

  Changed 3 years ago by mloskot

  • summary changed from rt_ prefixes brake WKT Raster seemless integration to [wktraster] rt_ prefixes brake seemless integration

  Changed 3 years ago by pracine

  • version set to trunk
Note: See TracTickets for help on using tickets.