Valid Geometry Formats

Craig Dubin shared this question 16 months ago
Answered

UPDATE: Close - Answered my own question. I'll leave this up here for others. But basically, just don't create the geometry in the database. When I bring over the concatenated string as a multipoint character field, YF's convert feature appears and it let me conver to WKT.

--Hopefully this will help some others!

Hey there, I was reading a post from a few years ago where the customer was having an issue with YF interpreting multipoints/polygons. I'm able to create point geometries just fine. I was wondering if there's a guide anywhere or general guidelines for allowable geometries. I've created a multipoint geometry field that displays just fine in SQL Server Management Studio's spatial results.

When I use this data in a view in YF, the field comes across with just the binary data. In the report, it gives a hyperlink to "download" and the convert function is not available.

I've gone through the Wiki as well as YF University and am not seeing anything beyond the basic x/y point concatenation. Note that in SQL, I need to use y/x to form the geometry as the STGeomFromText method requires longitude first.

Here are some screenshots:

sample code that works in SQL

 select geometry::STGeomFromText('MULTIPOINT('+
		string_agg(convert(varchar(max), 
		concat(fromlon,' ',fromlat)+', '+concat(tolon,' ',tolat)
		)
		,', ') 
		within group (order by segmentid, shapeid)+')',0)
 from poly
Single Record Return:

/53bbf4567d26fd7e164a5cb18db52b64

Spatial Representation:

/3382fef1e8b55167003bf1203b55e8de


Prepare View:

/7ff7ff6bbd5d49fe7ae967350543dc10


Test Report shows Download for Binary Data Hyperlink:

/608dc210ecd09b6f862eec08e69effb4

YF Doesn't read as geometry - Maps other than lat/lon inputs are not available:

/7f2a442a2cb94ff272a24000c8eeb782


Please point me to any documentation you might have on utilizing geometry/geography columns other than POINT.

Thanks!

Craig

Replies (1)

photo
1

Hello Craig,

Thank you for contacting yellowfin support.

Glad to here that you have solved this issue, and thank you for sharing the updates, this helps. We are closing this issue as per you request.

Please let me know if you have any queries further we are happy to help you.

Best Wishes,

Priya Chegudi.

Leave a Comment
 
Attach a file