-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SRID not being optional for expression in GeometryCast #124
Fix SRID not being optional for expression in GeometryCast #124
Conversation
@nickknissen Hi, thanks for the PR, I'll review it later. |
6b8e95e
to
b76c6c2
Compare
@MatanYadaev I will add some tests. |
9d41384
to
e557924
Compare
@MatanYadaev I have updated the description with some more information about the error and added tests |
e557924
to
26825ce
Compare
6ac3c7d
to
0b8bdc5
Compare
Can you please resolve conflicts and fix CI? |
b27b156
to
bad6172
Compare
It should be up to date now. |
Thanks! |
The current implementation of GeometryCast requires SRID to present in the expression when setting an model attribute with
DB:raw
The given case:
This will throw the following error because the regex looks for a SRID in the expressionValue
The
ST_GeomFromText
specifications allows SRID not to be specified as seen in mysql and PostGis documentation:I have adjusted GeometryCast regex treat SRID as an optional parameter and return 0 when SRID is not defined.