Tag Info

Hot answers tagged

14

I've described the process of installing and spatially enabling an sqlite db here: SpatiaLite Quick Start. Basically, you need to get init_spatialite-2.3.sql and run it on your db. You can then create point geometries using this function: MakePoint( x Double precision , y Double precision , [ , SRID Integer] ) : Geometry


8

You have two tasks: (a) find the grid data for the vertices of a grid cell in which a GPS location (x,y) lies and (b) interpolate those data. An efficient way to accomplish (a) is to store the grid as an array with a single index. Often grids are stored by rows with data progressing left to right within each row. A grid is determined by the coordinates of ...


8

In the documentation, it is alluded to that you cannot edit data in a SQLite database from ArcMap: You can connect from ArcGIS to an SQLite database to create maps and perform spatial analysis on your data. However, the only place this appears to be explicitly stated by Esri is in the ArcGIS Discussion Forum: Yes; you cannot edit data in a SQLite ...


7

I don't know if this is the answer you want, as it's not a point and click answer, but this is how I would do it probably. In Spatialite, add a new geometry column. Assuming you want WGS84 (lat/lon) AddGeometryColumn( yourTableName , geometryColumnName, 4326, 'POINT', 'XY') Then create the geometry from WKT generated from the X/Y coordinates update ...


6

In SQLite, and thus also in SpatiaLite, there's no date type per se. See Datatypes In SQLite. When a string column is saved in the format "YYYY-MM-DD" then you can apply some date functions to it, such as strftime() to get the date formatted in other ways. However, if you've saved your dates in any other way, they are NOT recognized as dates. What I would ...


6

For sake of posterity, the short answer is that MapInfo and FDO (AutoDesk technology) are far removed from any development with SQLite, compared to the members of the SQLite Consortium. MapInfo and FDO (AutoDesk) would be contributing binary to their downstream users, via their products and services. Spatialite is specked under a triumvirate of ...


5

You can connect to Spatialite via Python using the latest version of pysqlite instead of pyspatialite. Spatialite is just the spatial enablement of SQLite so this works, but if you are connecting in this way (via pysqlite) you need to load the libspatialite extension to be able to use the spatial functionality of Spatialite. from pysqlite2 import dbapi as ...


5

The sqlite file from NE is in FDO-OGR format, not the native spatialite geometry. If you're willing to do some manual labor, here's a way to convert to a spatialite db: First make a new, empty spatialite database (I call it "nev.sqlite"), then in a separate terminal session open the original natural_earth_vector.sqlite with spatialite. (I used the newer ...


4

ogr2ogr? See here for more information and maybe here as well Cheers St├ęphane


4

Have you tried something like [1]: spatialite test.sqlite 'CREATE VIRTUAL TABLE "roads_net" USING VirtualNetwork("roads_net_data")'. And the correct routing query seems to be [2]: SELECT * FROM Roads_net WHERE NodeFrom = 1 AND NodeTo = 512; [1] ...


4

You can install the Open Source ArcGIS OGR Workspace plugin from AmigoCloud that will give ArcMap read access to spatialite and a whole bunch of other formats. It is free. Let me know if you want to test the binaries - I already have some people doing that with success. They only work with 10.1 at the moment since that is the only ArcGIS version I have ...


4

Here's something you might try: You can create buffers around all the points at a "reasonable" distance that you choose based on the clustering. Then merge the circular buffers together. That should give you polygons enclosing the clusters of points. In spatialite you would do: Create a polygon table for the buffers and a second one for the merged circles: ...


3

The Integrate tool in ArcGIS will do what you're asking. The help file shows boundaries, but it works on points, too. You'll have to experiment with the tolerance value and inspect the output to determine what value is best for your data.


3

Have you had a look at OpenLayer's "Dynamic POIs via a Text Layer" example? That should be even easier than an SQLite solution. Update: Geodjango doesn't seem to be an option on shared hosting. See GoDaddy Forum: You can install and use Python and FastCGI on our Deluxe and Premium Linux shared hosting accounts. However, Django will not function on ...


3

You can use GeoDjango on a shared server at http://www.alwaysdata.com (just check the features list and the prices: http://www.alwaysdata.com/plans/shared ) They have VERY competitive prices and you can even test the env for free. They do the PostGIS configuration on their side and the installation of geoDjango so that you don't have to configure ...


3

I found the solution as for source table did not created with spatialite option which default is false. To do that simply add parameter to ogr2ogr utility -dsco "SPATIALITE=YES" then all SpatialLite parameters shall work as requested.


3

This seems to be a bug (see http://hub.qgis.org/issues/9628 - apparently fixed in 2.2.) Possible workaround: I have experienced that when using fields from joined tables (I have tested dbf and csv), the field calculator messes things up when I choose "Create new field". If I change to "Update existing field", things seem to work.


3

Standard OSM tiles are in Spherical Mercator (SRID=3857) so it will probably be easiest to build your grid using the same projection. If you use SM, you might store the data at the highest zoom level OSM supports, or at the highest level zoom level you'll permit users to zoom into. If coverage is sparse, use a data structure along the lines of XIndex, ...


3

The value stored in a cell from a heatmap is often normalized by its area. In this case I would rather suggest an equal area projection so that you can easily aggregate to larger scale


3

From the ogr2ogr docs, use the -nln name option to assign an alternate name to the new layer.


2

I appreciate the input of everyone here. A number of the comments triggered thoughts and I figured out a solution. Many thanks to underdark for her comments, as they gave me some avenues to pursue. I figured out how to install FeatureServer on a GoDaddy hosted website. Much credit goes to the FeatureServer Getting Started document. From GoDaddy: If ...


2

You should be able to go directly from .tab to spatialite using OGR. See the spatialite format page for more details. You also don't have to create multiple dbs and merge them, just 'append' them all together from the start.


2

My understanding is that to do this using ArcGIS Desktop 9.3 (or 10 or 10.1) the simplest, but expensive, option would be to use the Data Interoperability extension. However, using ArcGIS for Desktop 10.2 with no extensions ... You can connect from ArcGIS to an SQLite database to create maps and perform spatial analysis on your data. You connect ...


2

Your MS Vs SQLLite code is different on the join: MS: FROM Inspections INNER JOIN Sections ON Inspections.GISLink = Sections.GISLink; SQLite: FROM 'Inspections', 'Sections' inner join 'Inspections' on 'Inspections'.'GISLink' = 'Sections'.'GISLink' You SQLite query is joining Inspections onto itself


2

I'm not sure this is really the place for basic SQL, but I guess it is loosely related to GIS.... This is pretty basic stuff, you really need to read about SQL if you're trying to do anything in GIS with it: update yourtable set tilenumber = replace(index,'_','') I would start with the basics of SQL itself (e.g http://sqlzoo.net/ and then move onto the ...


2

It's not %s in your SQL prepared statements, it's ?. statement = "INSERT INTO %s (%s) VALUES (?, ?, ?);" % (table,columns) Also, you can define statement far earlier in your code (before the walk) and just reuse it.


2

Also, in order to use spatialite style queries, you must specify -dialect sqlite in ogr2ogr and ogrinfo sql


2

Have you seen this Spatialite web page that has instructions, source code and binaries for Android? https://www.gaia-gis.it/fossil/libspatialite/wiki?name=splite-androidAlso, the "SpatiaLite Users" google group might be helpful.


2

Paul, The solution is to rename the following DLL from: C:\OSGeo4W\apps\Python27\DLLs\sqlite3.dll to: C:\OSGeo4W\apps\Python27\DLLs\xxsqlite3.dll There are two versions of this dll that ship with the OSGeo4W installer which I bet is what you are using. This change doesn't affect Python. When it doesn't see the dll because of the name change it ...



Only top voted, non community-wiki answers of a minimum length are eligible