Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Line Length - Geometry Field?

Posted on 2013-02-06
6
Medium Priority
?
556 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
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
LVL 49

Assisted Solution

by:PortletPaul
PortletPaul earned 1000 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 49

Accepted Solution

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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

972 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