Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#151 closed defect (fixed)

[wktraster] rt_ prefixes brake seemless integration

Reported by: pracine Owned by: pracine
Priority: medium Milestone: WKTRaster 0.1.6
Component: raster Version: master
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 (15)

comment:1 Changed 12 years ago by mloskot

Milestone: 1.4.1

Pierre,

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

comment:2 Changed 12 years ago by pracine

Milestone: wktraster 0.1.6
Owner: changed from pierre to pracine
Reporter: changed from pierre to pracine
Summary: rt_ prefix brake WKT Raster seemless integrationrt_ prefixes brake WKT Raster seemless integration

comment:3 Changed 12 years ago by pracine

Status: newassigned

comment:4 Changed 12 years ago by pracine

Resolution: fixed
Status: assignedclosed

comment:5 Changed 12 years ago by mloskot

Resolution: fixed
Status: closedreopened

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.

comment:6 Changed 12 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()

comment:7 Changed 12 years ago by mloskot

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

comment:8 Changed 12 years ago by pracine

Resolution: fixed
Status: reopenedclosed

comment:9 Changed 11 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.

comment:10 Changed 11 years ago by mloskot

Updated regression tests runner (r4148)

comment:11 Changed 11 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.

comment:12 Changed 11 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...

comment:13 in reply to:  12 Changed 11 years ago by mloskot

Regina,

Good point. I support Pierre's proposal.

comment:14 Changed 11 years ago by mloskot

Summary: rt_ prefixes brake WKT Raster seemless integration[wktraster] rt_ prefixes brake seemless integration

comment:15 Changed 11 years ago by pracine

Version: trunk
Note: See TracTickets for help on using tickets.