The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

Latest version of SQL Anywhere

I need to enter some simple polygon data into the database where I can run queries to see if a point is inside or outside of the polygon. I can see in the examples doing a select for this but the data is contained in the select statement itself. So how do you get into the database a series of points that define the polygon? I will have between 3 and 10 points. For example.

(0 0, 100 0, 200 100, 300 500 , 400 500, 0 0)

Thanks TPS

asked 20 Sep '16, 09:48

TPS's gravatar image

accept rate: 0%

Cf. that help topic:

How to create geometries

E.g. you could use one of the ST_Polygon constructors, such as:

insert MyTable (MyGeometryColumn)
select new ST_Polygon('Polygon ((0 0, 100 0, 200 100, 300 500 , 400 500, 0 0))', MySRID)
permanent link

answered 20 Sep '16, 10:19

Volker%20Barth's gravatar image

Volker Barth
accept rate: 32%

edited 20 Sep '16, 10:20

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 20 Sep '16, 09:48

question was seen: 276 times

last updated: 20 Sep '16, 10:20