Opened 14 years ago

Closed 14 years ago

#817 closed defect (fixed)

Renaming old 3D functions to the convention ST_3D..........

Reported by: nicklas Owned by: nicklas
Priority: medium Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: history Cc:

Description (last modified by nicklas)

Old name ---> should be 

ST_length3d ---> ST_3DLength
ST_length3d_spheroid ---> ST_3DLength_Spheroid
ST_perimeter3d ---> ST_3DPerimeter
ST_MakeBox3d ---> ST_3DMakeBox
ST_Extent3d ---> ST_3DExtent

What about functions with explicit 2D, I guess they should follow the same convention:

ST_length2d ---> ST_2DLength
ST_length2d_spheroid ---> ST_2DLengthSheroid
ST_perimeter2d ---> ST_2DPerimeter
ST_area2d ---> ST_2DArea
ST_MakeBox2d ---> ST_2DMakeBox

-- Those functions I think should keep their names because that tells something that they are forced towards 3D, 2D and 4D, not from.

ST_force_2d
ST_force_3dz
ST_force_3d
ST_force_3dm
ST_force_4d


Comments?

Should we rename the C-functions at the same time where appropriate?

Change History (12)

comment:1 by nicklas, 14 years ago

Hmm, I didn't preview so the formatting was not the nicest. I can not edit it, sorry.

comment:2 by robe, 14 years ago

Old name ---> should be 

ST_length3d ---> ST_3DLength
ST_length3d_spheroid ---> ST_3DLength_Spheroid
ST_perimeter3d ---> ST_3DPerimeter
ST_MakeBox3d ---> ST_3DMakeBox
ST_Extent3d ---> ST_3DExtent

What about functions with explicit 2D, I guess they should follow the same convention:

ST_length2d ---> ST_2DLength
ST_length2d_spheroid ---> ST_2DLengthSheroid
ST_perimeter2d ---> ST_2DPerimeter
ST_area2d ---> ST_2DArea
ST_MakeBox2d ---> ST_2DMakeBox

-- Those functions I think should keep their names because that tells something that they are forced towards 3D, 2D and 4D, not from. ST_force_2d ST_force_3dz ST_force_3d ST_force_3dm ST_force_4d

Comments?

Should we rename the C-functions at the same time where appropriate?

comment:3 by robe, 14 years ago

Nicklas, Is that any better. Why couldn't you edit the description?

I took ST_Box2D out. that has already been removed from the codebase and is just box2d because its a casting function.

As far as renaming the c functions. I guess it would be nice if things matched since it would make debugging a little easier.

comment:4 by robe, 14 years ago

For the old 2D functions hmm yah I would like that except they aren't currently marked as deprecated (though maybe no one knows that since they aren't documented anyway). I just would hate having two sets of names when I was all happy about having gotten rid of 200 some odd confusing synonyms. If we do the others have to go. Makes me think we should wait for 2.1 to deal with those.

comment:5 by nicklas, 14 years ago

Regina

I don't think I have authority to edit the description. I know you have helped me out before on that.

But this time your editing just became a comment post not editing the description.

About the old functions, isn't the problem the same with old ST_Length3D and company that there will be confusing synonyms. Maybe we should wait with all renaming? I don't know. The situation is not the best with multiple naming conventions. We need a strategy :-)

comment:6 by robe, 14 years ago

Description: modified (diff)

comment:7 by nicklas, 14 years ago

Description: modified (diff)

renamed in r6974

ST_length3d ---> ST_3DLength ST_length3d_spheroid ---> ST_3DLength_Spheroid ST_perimeter3d ---> ST_3DPerimeter ST_MakeBox3d ---> ST_3DMakeBox ST_Extent3d ---> ST_3DExtent

/Nicklas

comment:8 by nicklas, 14 years ago

Keywords: history added

comment:9 by robe, 14 years ago

Nicklas,

I'm a bit concerned that since we never marked these as deprecated we can't just remove them. Leave for now though. Since these aren't that commonly used, I suspect its not too big of a deal and fewer functions that do the same thing the better.

However, can you put the old functions in the legacy.sql.in.c in case people were using them.

comment:10 by robe, 14 years ago

Nicklas, Forgot to mention, also change the Availability note from 1.2.2

and in the docs put in note:

<para>Changed: 2.0.0 In prior versions this used to be called blah blah blah</para>

Where blah blah blah is the old name - that way it will get picked up in What's new Changes section automatically

comment:11 by nicklas, 14 years ago

Regina

Thanks I thought I had to ask about how to do about "availability" since the functions has been available under different name. But now I just changed ti Availability 2.0.0 since the function under the new name isn't available until 2.0.0.

Done in r6976

comment:12 by robe, 14 years ago

Resolution: fixed
Status: newclosed

I think this is done -- Nicklas correct me if I am wrong.

Note: See TracTickets for help on using tickets.