Solved

Line Length - Geometry Field?

Posted on 2013-02-06
6
552 Views
Last Modified: 2015-01-05
Within my GIS Package there is the local Length or Area of a measurment. Each Line or Area is stored in SQL Server. This is a function only in my GIS Package its currently not a column in the SQL table. Its calculated live on the fly only in the GIS package

Is there a way within SQL Server to determine the Length of a Line Feature on the fly?

Then i need to build a query like this?
First Step
I need a query that will the determine the length of the line is "X" meters.
Second Step
The total address range(Smallest # of the 4 columns) and (Largest # of the 4 columns) in this case the address range is 1-400. That will come from  these 4 existing columns L_F_ADD(1), L_T_ADD , R_F_ADD, R_T_ADD(400).
Third Step  
Calculate the length of the line(Step 1) (divided by 15.25m) then multiplied by 2, . This will give me the total amount of address numbers there should be.
Forth Step
Are the Total Address #'s (Step 3) within 10% of the Actual address numbers on the Road(Step 2). If not flag a column (RangeError).
0
Comment
Question by:PtboGiser
  • 3
  • 2
6 Comments
 

Author Comment

by:PtboGiser
ID: 38860377
I have also posted this on the GIS Software package site. I would prefer doing it in SQL server as i know this software won't change. We may be changing GIS Packages shortly so that query will be retired at that point,
Thanks
0
 
LVL 32

Expert Comment

by:awking00
ID: 38860542
Not sure I completely understand what you're trying to accomplish. Can you post some sample data and your expected output?
0
 

Author Comment

by:PtboGiser
ID: 38861245
Is there a length field somewhere is SQL Server? So i can find out the Length of a Line to query its results?
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 48

Assisted Solution

by:PortletPaul
PortletPaul earned 500 total points
ID: 38861759
the [unstated] GIS package seems to store lines and areas, but not length of line, which is calculated 'on the fly'.

You want that length of line, and then perform some additional arithmetic with that value.

Does the GIS package have an api?
(i.e. can it return the calculated value to you? perhaps it has a web service?)
Or can you scrape that value from (say) a url?

From what I understand of the subsequent arithmetic - that won't be a problem. Getting the initial length value  is the hard bit.
0
 

Author Comment

by:PtboGiser
ID: 38863843
I can get the Length from the GIS Software (Manifold GIS) and populate it in the table but then it becomes static data i need to run a query to update. I was hoping to keep the data "Live"
I'll work with it that way.
0
 
LVL 48

Accepted Solution

by:
PortletPaul earned 500 total points
ID: 38865464
Ok, so is there anything else required on this question?
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
tools to scan a SQL server's problem 14 28
HTML <font style="color:red"> 9 33
Where is the Help Section? 8 30
SQL Find Carriage Return and Delete it. 3 16
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question