My Sql SVG

Posted on 2012-08-23
Last Modified: 2012-09-10
I have a mysql database with ploygones in the Blod field. I want to know how to draw them in a web page relative to a query of info in the record using SVG.
Question by:trconsulting
    LVL 4

    Expert Comment

    It depends on a programming language you want to use to draw it. This blob data is just data.

    Here is some information (quite old) about drawing in several languages -

    Author Comment

    I would like to use PHP

    This is the contents of the field. Doesn't it have to be parsed or something. I understand it is coordinates but have no idea where to go from here

    POLYGON((7545792.28100903 472873.18993964, 7545792.19768608 472872.976457447, 7545792.43057574 472872.885559682, 7545792.47602463 472873.002004514, 7545794.18388217 472872.335420899, 7545791.7296425 472866.047399937, 7545790.02178495 472866.713983552, 7545791.24890479 472869.857994033, 7545791.01601512 472869.948891799, 7545789.78889529 472866.804881318, 7545782.99513744 472869.456512115, 7545781.71663323 472872.371915007, 7545783.21689233 472876.215737089, 7545785.72662572 472875.23617813, 7545785.87054718 472875.6049201, 7545792.28100903 472873.18993964))
    LVL 4

    Accepted Solution


    The "Values" method accepts an array. Create it by using the explode function twice - the first time use ',' as a delimiter, the second time use ' '. Before that cut out 'POLYGON((' and '))'.

    You may want to scale your coordinates to match a range you use for a drawing in a web page (set in SVGGraph constructor).

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    I feel like more and more people want to know how to programmatically convert addresses into geospatial locations. So in this article, I will show you how you can do it with Bing Maps. I'm going to use PowerShell, which is a nice scripting language,…
    Introduction This article is designed to assist GIS (Geographic Information System) and GPS (Global Positioning System) developers using ESRI ArcGIS and other spatial information management systems.   For the uninitiated the concept of projectio…
    This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
    This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

    731 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now