Results 1 to 1 of 1
  1. #1
    Join Date
    Nov 2004

    Unanswered: Spatial Data in PostgresSQL


    I am slowly coming up to speed on MapServer, which is designed to work with spatially enabled databases such as postgresSQL.

    Problem is, I don't really understand what a spatially enabled database is.
    Before I ask my question, here is some info:

    What I know:
    PHP, MySQL, Perl, JavaScript, bits of MapServer/MapScript.

    What I don't know:
    Installing and setting up database systems. I am always a programmer, never a system admin.

    What I have:
    I have a decent web host that has set up postgresSQL and MapServer for me but I DO NOT have telnet access to look around in the database.
    I have a datafile that includes lat/long for a bunch of items, it looks vaguely like this:

    itemName, latitude, longitude, height, qualityIndex1
    A, 32.987, -117.024, 40, 42
    B, 33.177, -116.635, 55, 99
    C, 32.662, -116.628, 300, 83

    My question is, can I just put this info into a table in postgresSQL and it will be magically "spatially enabled" because I have columns named lat and long? Do I need to name the latitude and longitude?

    Is there a command to import this so that it interprets lat and long, then inserts it into the database in a spatially enabled way?

    So, the question really is:
    How do I take a flat file with lat/long points and create a nice spatially-enabled table of data points in a postgreSQL database such that I can use MapServer to map it?


    Last edited by sdduuuude; 11-18-04 at 00:42. Reason: switched lat/long fields.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts