How to get data from a GIS server in R? -


I am using ArcMap to use GIS data on the spatial data server. I have to find out how to do this in R.

I know how to read the file size in R. I used to use maploles and RGDL to open and map files stored locally (like)

My problem occurs when the data is not stored locally, rather it is a The application is on the server. I believe this is an Oracle database, I have been given information about 1. Server 2. Example (number one) 3. Database 4. Users and 5. Passwords Generally, I will include an example, but it is suspicious that an external user can access the server

Example How to Read and Plot Local Files

  Library (rgdal) ogrInfo (".", "Nw-rivers") centroids.rg & lt; - readOGR (".", "Nw-centroids") plot (centroids.rg)   

"." The local directory indicates how can I change this to access the data on a server? The actual syntax of code will be useful.

You can read data from Oracle SPECIAL DB using GDAL / OGR:

If you have a driver in your GDAL / OGR installation. If:

  is required (RGDL) aggregator ()   

shows the Oracle driver, then with all the parameters, readOGR can be used in the right place.

By analogy with an estimate, and PostGIS example, I'll try:

  DSN = "oci: userid / password @ database_instance:") ogrListLayers (DSN) S = readOGR (DSN, layout)   

But I do not have an Oracle server to test it (if I did yesterday, PostGIS, and spend license savings on a yacht ) And you do not say your Oracle server anyway. The general principle for connecting with any spatial database is the same - check that you have an OGR driver, find out what the DSN parameter looks like, try it.

Another way to go through the ODBC or any other non-local R database connection, although you will probably get back to the spatial data in WKB or WKT form, and you will be able to get rid of the secretive whiteware (points, lines, polygons?). Must have to convert.

Here is an example of PostGIS:



Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -