Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1055191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:31:30+00:00 2026-05-16T17:31:30+00:00

I have records in a table representing bus routes, with SQL Server spatial columns

  • 0

I have records in a table representing bus routes, with SQL Server spatial columns for the actual route geometry. (They’re stored in a Geography column type.)

I use OpenLayers to display these bus routes on top of an OpenStreetMap layer.

In instances where the bus routes overlap, currently you cannot see anything but the top route. I’ve tried using transparency on the lines, but it doesn’t look that great.

Is there a way, either in OpenLayers or SQL Server spatial, to take overlapping lines and shift them slightly (but keep them parallel) in order to have them all visible? If nothing is built in to handle this, is there a standard algorithm to accomplish this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T17:31:31+00:00Added an answer on May 16, 2026 at 5:31 pm

    SQL Server Spatial Tools has a method, ShiftGeometry, that will shift a geometry (not geography) over by a given X and Y amount.

    So, you could, for each successive geography:

    1. convert to geometry
    2. break the multi-line strings down to lines
    3. buffer and intersect with all previously processed lines
    4. shift intersecting lines over by slope-appropriate X & Y amounts
    5. munge the corners back together (??)
    6. reconstitute for display

    Alternatively, rather than shift lines over, fatten them up:

    1. buffer enough to detect intersects
    2. intersect w/ previously processed shapes
    3. buffer again, enough to be visible as a fatter shape beneath the previous one (–how much??)
    4. union with original shape
    5. display w/ layers.

    Looks expensive!

    OpenLayers may have something for this. If not, it may have better primitives for accomplishing it. On SQL Server, it’s going to be very CPU intensive. Intersects aren’t cheap, and you will very quickly need to perform a lot of intersects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 530k
  • Answers 529k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer jQuery UI buttons I suggest you take a look at… May 16, 2026 at 11:26 pm
  • Editorial Team
    Editorial Team added an answer For your code, Enumeration Enumv = v.elements(); This is what… May 16, 2026 at 11:26 pm
  • Editorial Team
    Editorial Team added an answer Try to put your code snippet at the end of… May 16, 2026 at 11:26 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have loaded an associative array of records from a MySQL database table. The
i have a mysql db with a table 'difficulties' with a few records. If
i have 500 records in a table. one column holds all html data. so
I have a table of about 1.6M rows where the records have a unique
I have a Job Register Table and that table doesn't have any records. This
I have a table of heterogeneous pieces of data identified by a primary key
I have a few tables representing geographical entities ( CITIES , COUNTIES , ZIPCODES
I have an SSIS package that loads data in a table. How do I
I have table: CREATE TABLE [dbo].[test] ( [name] nvarchar(max) NULL, [date] datetime NULL )
I have a table I'd like to sort with a priority column. This column

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.