laravel-eloquent-spatial icon indicating copy to clipboard operation
laravel-eloquent-spatial copied to clipboard

Fix SRID not being optional for expression in GeometryCast

Open nickknissen opened this issue 1 year ago • 2 comments

The current implementation of GeometryCast requires SRID to pressent in the expression.

The ST_GeomFromText specifications allows SRID not to be specified

I have adjusted GeometryCast to use the same regex and return 0 when SRID is not defined.

nickknissen avatar Jul 02 '24 13:07 nickknissen

@nickknissen Hi, thanks for the PR, I'll review it later. What issue does it solve? Can you add tests to indicate the issue is solved?

MatanYadaev avatar Jul 02 '24 14:07 MatanYadaev

@MatanYadaev Currently ST_GeomFromText('POINT(9.581389 55.724167)') is not supported as an expression value. SRID is required.

I will add some tests.

nickknissen avatar Jul 03 '24 05:07 nickknissen

@MatanYadaev I have updated the description with some more information about the error and added tests

nickknissen avatar Jul 29 '24 13:07 nickknissen

Can you please resolve conflicts and fix CI?

MatanYadaev avatar Aug 03 '24 20:08 MatanYadaev

Can you please resolve conflicts and fix CI?

It should be up to date now.

nickknissen avatar Aug 06 '24 08:08 nickknissen

Thanks!

MatanYadaev avatar Aug 07 '24 20:08 MatanYadaev