Questions tagged [spatialite]

Spatialite is a library extending the basic SQLite core in order to get a full fledged Spatial DBMS.

Spatialite is a library extending the basic SQLite core in order to get a full fledged Spatial DBMS.

236 questions
0
votes
2 answers

SQL/SpatiaLite: How to insert a default value into certain columns when inserting data from another table?

I have a new table, with these columns (all NOT NULL): creation_date, created_by, attribute_1, attribute_2, geometry I also have an old table: attribute_1, attribute_2, geometry I want to insert the data from the old table through INSERT INTO /…
MapEngine
  • 553
  • 1
  • 9
  • 21
0
votes
1 answer

How to get all the points that the distance between them is less than (some distance) in spatialite

I am working with "SpatiaLite" and i have a table with a geometric column. this column is a BLOB with POINTS. for example to insert a point i do: "INSERT INTO exampletable(geom) VALUES(GeomFromText('POINT(-101.1 46.6)', 4326))" I want to get all…
0
votes
1 answer

Encrypt Spatialite Database using SQL Cipher

I'm currently using a spatialite lib given here: What I want is to encrypt the spatialite database, but the problem I don't know where to start. I'm thinking of using SQLCipher, but If I'am not wrong the sqlcipher replaces all the SQLiteDatabase…
Adolf Dsilva
  • 13,092
  • 8
  • 34
  • 45
0
votes
1 answer

Syntax error while using centroid function within the RotateCoords function in Spatialite Query

CREATE TABLE rotated_bus AS SELECT AO_id, RotateCoords(ST_Centroid(Geometry) FROM Substation, 45.00) AS Geometry FROM Busbar; I am trying to rotate a line geometry (Busbar) by passing the centroid of a polygon geometry (Substation) inside the…
harinish
  • 261
  • 3
  • 5
  • 17
0
votes
2 answers

Converting coordinate units to meters

public double CalculateDistance( Coordinate c, Coordinate a, Coordinate b, LineMode mode) Parameters: c Type: SpatialLite.Core.API.Coordinate The coordinate to compute the distance for. a Type:…
jayt.dev
  • 975
  • 6
  • 14
  • 36
0
votes
1 answer

How to connect Spatialite with Google Map on Adrioid

I am decided to create an application that can pass the coordinates data stored in Spatialite data to the Google Map for Android for marker display.
Jimmy Lee
  • 91
  • 3
  • 11
0
votes
0 answers

Can't use cx_Oracle LOB in Spatialite WKB insert statement

I have some Python code the selects data from Oracle spatial and inserts into Spatialite. My problem is that the cursor contains the geometry in binary and I can’t figure out how to read the binary into the Spatialite insert statement. Just to…
user3178147
  • 31
  • 1
  • 5
0
votes
3 answers

Update with two table ,I had a example for one row,but I must update 168432 rows,used sqlite

I want to update the sqlite table, the following is the example for updating one row: update tpecroad set tnode = (SELECT b.nodeid FROM "TPECRoad" as a join tpecnode as b where pointn(a.geometry,numpoints(a.geometry)) = b.geometry and a.pk…
0
votes
1 answer

Which SRID works with adding and sorting in SpatiaLite db?

I'm trying to make geodjango app. I'm using SQLite and SpatialLite. I want to add shops, and be able to sort them from closest to furthest from my location. When in my model I have: location = gis_models.PointField(srid=4326, blank=True,…
ajgoralczyk
  • 35
  • 1
  • 10
0
votes
1 answer

GRASS r.in.gdal crash:procedure entry point sqlite3_rtree_geometry_callback could not be located in the dynamic link library spatialite.dll

I wrote the following python script to try to import a raster file into GRASS: import os os.chdir(r'C:\Users\Desktop') import sys sys.path.append(os.path.join(os.environ['GISBASE'], 'etc', 'python')) import grass.script as g import…
Heinz
  • 2,415
  • 6
  • 26
  • 34
0
votes
1 answer

Switching MapServer from Linux with Apache to Windows with IIS. Blank PNG Response

I'm having a interesting problem that I've been working on for a few days now where in windows I get a blank png response back however in linux with an almost identical map file I get the expected out put. I had MapServer set up in Linux using…
Zach Russell
  • 328
  • 3
  • 7
0
votes
1 answer

libspatialite.so spatialite load extension using java

I followed this link to install Spatialite. How do I use the spatialite installation in my Java code? Which extension do I load for spatialite function addGeometry() (Linux / Ubuntu) In windows I tried this and it worked but not for…
0
votes
1 answer

CastToDouble Spatialite doesn't cast negative numbers

I am using a spatialite database. I need to cast to double a negative number (this number is a text). When I do SELECT CastToDouble("-5.84"), I get a NULL.. How can i Cast a negative number , in text format, to a Double? Thanks!
Bae
  • 892
  • 3
  • 12
  • 26
0
votes
2 answers

How do I make the SpatiaLite banner go away under Django manage.py?

Every time I run manage.py I get the SpatiaLite banner. SpatiaLite version ..: 3.0.0-beta Supported Extensions: - 'VirtualShape' [direct Shapefile access] - 'VirtualDbf' [direct Dbf access] - 'VirtualText' [direct CSV/TXT access] -…
Josh
  • 7,936
  • 5
  • 41
  • 63
0
votes
1 answer

How can I copy geometry table from spatialite?

I tried spatialite: create table Twn_free_way as select * from Twn_road; This works fine but I can not copy the complete table.