bdit_data-sources
bdit_data-sources copied to clipboard
fix to allow text_to_centreline() to handle capitalized text
What this pull request accomplishes:
Currently, gis.text_to_centreline() fails if the input text is capitalized, e.g.:
SELECT *
FROM gis.text_to_centreline(111,'BLOOR ST W', 'BETWEEN SHAW ST AND OSSINGTON AVE', NULL);
The problem has to do with using SPLIT_PART on fixed lower-case text and in the function function-clean_bylaws_text.sql which gis.text_to_centreline() calls. The 'Between' is also only checked for first letter capitalization.
This PR adds a replace for any possible AND or BETWEEN with the lower-case before SPLIT_PART in function-clean_bylaws_text.sql.
What, in particular, needs to reviewed:
- pls confirm that these fixes work