Convert Shapefiles to MySQL
kuitg
Global Mapper UserTrusted User
Good afternoon
Is there an easy way to convert Shapefiles to MySQL. I understand that MySQL format will contain the function of .shp .dbf and .shx. hence the reason I would like to convert.
Regards
Geert:(
Is there an easy way to convert Shapefiles to MySQL. I understand that MySQL format will contain the function of .shp .dbf and .shx. hence the reason I would like to convert.
Regards
Geert:(
Comments
-
Geert,
If you have v14 you should be able to export loaded vector data to MySQL databases using the File->Export->Export Vector Spatial Database menu command. See http://www.globalmapper.com/helpv14/Help_SpatialDBSupport.html#open_spatial_db for details.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com -
Hi Mike,
We are thinking of Purchasing some GMv14, however I have a couple of questions about the database aspect.
Currently in the office we have 1 person that works on some shape-files using global mapper 11. The work load is becoming larger and require more people to work on the data.
However, my question is we want to put these shapfiles in a database so that we can have 2-3 work on the same data, By purchasing 2-3 licenses of GMv14 and putting the data in say mySQL, is this possible? (more then 1 person working on the data at the same time) is our approach correct?
Sorry in advance for my English. -
You can certainly export your data to MySQL databases, then have any number of people import data from that database to work on at a time. However the access is not yet dynamic so if one person changes something and export to the database the other consumers of the data won't know about the change until they re-import the data. In the future we may add support for more real-time transactions, but currently the support is very similar to the normal file support.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com -
Hi
I have exported data via Vector Spatial Database. This works fine if I open the data with something like MySQL workbench where I can add,edit and delete data etc., and here it shows the type as text fields. If I however use Delphi's XE3 MySQL component it seems that the converted data is "Blob" or "Memo'' fields. I need to know whether this is the case, I am reffering to normal attribute fields like "area" "names" etc. In other words what is the data type and how big is it when exported.
Regards
Geert -
I have exported data via Vector Spatial Database. This works fine if I open the data with something like MySQL workbench where I can add,edit and delete data etc., and here it shows the type as text fields. If I however use Delphi's XE3 MySQL component it seems that the converted data is "Blob" or "Memo'' fields. I need to know whether this is the case, I am reffering to normal attribute fields like "area" "names" etc. In other words what is the data type and how big is it when exported.
Hi Geert,
All of the attributes are exported as TEXT columns, with no specific length specified.
Cheers,
Bob -
Hello,
I would need a bit of assistance connecting to an Oracle Spatial Database.
I have the connection info but I cannot get it work. First of all, shouldn't the server and the port be available for entering info there?
oracle_gm.JPG
Bottom line, I could not figure out a way to connect via this tool. -
Hi Robert,
Typically, an Oracle Spatial Database configuration is defined by setting up a TNSNAMES.ORA file containing the server, port and an instance name. Once that is set up and working correctly (Oracle provides utilities for defining the file and testing it), you can use the instance name (in the Database Name field) along with your user name and password to connect via Global Mapper.
Also, be sure to read the sections in the Global Mapper help that describe how to ensure that Global Mapper uses your local Oracle client software.
Here is a link to a description of the configuration file.
Here is a link to the Oracle documentation for the file syntax.
I hope this helps.
Cheers,
Bob -
Hello Bob,
Unfortunately I am still having some issues. Can you please assist me further?
I installed Oracle DB 11g and in the .../network/admin/tnasnames.ora is made the appropriate configurations
(ORA11 =
(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ORA11) ) ))
I just replaced the values with my connection credentials.
The error I get is (translated):
Unable to get table names from BBB
ORA-12154: TNS: the specified connection identifier could not be solved in <unnamed>
OracleSpatialOverlay.cpp - 58
Version: v14.1.3 (64-bit)
Build Time: Mar 24 2013 22:32:36 -
Hi Robert,I installed Oracle DB 11g and in the .../network/admin/tnasnames.ora is made the appropriate configurations
(ORA11 =
(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ORA11) ) ))
I just replaced the values with my connection credentials.
Have you tested your connection definition using the Oracle utilities, so that you know your configuration file is set up correctly? Is the configuration file listed above the one you are using, or is it the default provided with the Oracle installation?The error I get is (translated):
Unable to get table names from BBB
ORA-12154: TNS: the specified connection identifier could not be solved in <unnamed>
OracleSpatialOverlay.cpp - 58
Version: v14.1.3 (64-bit)
Build Time: Mar 24 2013 22:32:36
The error message seems to suggest that your configuration file is not correct, or that Oracle could not find your tnsnames.ora file. This is a common error, apparently, and it looks like some people have had success solving it using Oracle configuration utilities instead of updating the tnsnames.ora file manually. My somewhat limited experience with Oracle suggests that it is very picky when it comes to processing the configuration files, and is dependent on some environment variables, such as ORACLE_HOME, etc.
Here is some additional information specific to using Oracle with Global Mapper:
Global Mapper requires an Oracle file called oci.dll in order to run, so we include a copy of that file as part of the installation. When you connect to an Oracle database, however, you need to use the version of oci.dll that is part of the Oracle client software instead of the one that was installed with Global Mapper. Here is what you need to do to make that happen:- Make sure that you have the Oracle client software installed.
- Make sure that the directory that contains oci.dll is in the system path. This is standard for most Oracle client installations.
- Make sure that the Oracle client matches Global Mapper in that if you are using 32-bit Global Mapper, you need to use the 32-bit Oracle client, and if you are using 64-bit Global Mapper, you need to use the 64-bit Oracle client.
- In the Global Mapper installation directory (typically "C:\Program Files\GlobalMapper14" or "C:\Program Files (x86)\GlobalMapper14"), rename the file "oci.dll" to "oci_original.dll".
- Start Global Mapper by double-clicking on "global_mapper14.exe" in that same directory. DO NOT use the original Global Mapper desktop icon -- see the note below for more information about this. (You may want to create a shortcut to "global_mapper14.exe" and put it on the desktop.)
I hope this helps,
Bob -
Bob,
Thanks for the help. I did all the things you have recommended.
I renamed the oci.dll file and copied the one from the oracle client. (I installed the whole Oracle package, not only the client);
I made sure everything is on 64bit.
I added ORACLE_HOME to the environment variables and I also tested the connection in sqldeveloper. The connection works, but still, GMapper cannot connect to the database for some reason.
Can you please tell me exactly how does GM look for the path until it reaches tsnames? how does GM compose the path?
I am guessing it has something to do with this as the connection works. -
Hi Robert,Bob,
Can you please tell me exactly how does GM look for the path until it reaches tsnames? how does GM compose the path?
I am guessing it has something to do with this as the connection works.
Global Mapper connects to the Oracle client using the connection name (as defined in tnsnames.ora, specified for GM in the Database Name field), user name and password. The Oracle client then searches for the tnsnames.ora file using the scheme defined here. The bottom line is that you may need to define a TNS_ADMIN environment variable that points to the directory containing your tnsnames.ora file.
Good luck,
Bob
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website