Opened 15 years ago

Closed 15 years ago

Last modified 14 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 by mloskot, 15 years ago

Milestone: 1.4.1

Pierre,

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

comment:2 by pracine, 15 years ago

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 by pracine, 15 years ago

Status: newassigned

comment:4 by pracine, 15 years ago

Resolution: fixed
Status: assignedclosed

comment:5 by mloskot, 15 years ago

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 by pracine, 15 years ago

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 by mloskot, 15 years ago

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

comment:8 by pracine, 15 years ago

Resolution: fixed
Status: reopenedclosed

comment:9 by mloskot, 15 years ago

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 by mloskot, 15 years ago

Updated regression tests runner (r4148)

comment:11 by robe, 15 years ago

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 by pracine, 15 years ago

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 comment:13 by mloskot, 15 years ago

Regina,

Good point. I support Pierre's proposal.

comment:14 by mloskot, 14 years ago

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

comment:15 by pracine, 14 years ago

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