wkt

Exception indexing polygons with solr (jts not found?)

£可爱£侵袭症+ 提交于 2019-12-23 22:07:43
问题 I'm having trouble setting up solr 4.10.2 to work with polygons. I try to adapt the example application to work with an field called geom with the type location_rpt . I added jts-1.13.jar to the file solr-4.10.2/example/webapps/solr.war in the directory WEB-INF/lib and I created a field in schema.xml: <field name="geom" type="location_rpt" indexed="true" stored="true" /> I start solr with java -jar start.jar . But when I try to add a document with a geom field I get an exception: Caused by:

GeoAlchemy2: Get the lat, lon of a point

妖精的绣舞 提交于 2019-12-22 13:44:08
问题 Consider the following SQLAalchemy / GeoAlchemy2 ORM with a geometry field: from geoalchemy2 import Geometry, WKTElement class Item(Base): __tablename__ = 'item' id = Column(Integer, primary_key=True) ... geom = Column(Geometry(geometry_type='POINTZ', srid=4326)) When I update an item in the PostgreSQL shell: UPDATE item SET geom = st_geomFromText('POINT(2 3 0)', 4326) WHERE id = 5; Fetching the field: items = session.query(Item).\ filter(Item.id == 3) for item in items: print item.geom Gives

Does PostGIS automatically convert upon inserting WKT?

偶尔善良 提交于 2019-12-12 19:21:50
问题 I'm quite new to PostGIS so bear with me. Suppose I have a table defined as follows: CREATE TABLE gtest (name varchar, geom geometry); At first, to insert, I was doing something like: INSERT INTO gtest VALUES ( 'Polygon', ST_GeomFromText('POLYGON((0 0,1 0,1 1,0 1,0 0))',4326) ); I then discovered that it still works by only doing this: INSERT INTO gtest VALUES ( 'Polygon', 'SRID=4326;POLYGON((0 0,1 0,1 1,0 1,0 0))' ); When I do a query without converting the geom values back into WKT, they

Efcore Spatial Query: A number is expected at position 9 of the input. The input has @p0. -

与世无争的帅哥 提交于 2019-12-08 06:47:56
问题 I'm trying to get around the fact that Entity Framework Core doesn't have support for Spatial Types by using the DBSet.FromSQL Method, and hand rolling a migration to add a geography column on SQL Server. Here's my DataContext public interface IDataContext { DbSet<PointOfInterest> PointsOfInterest { get; set; } int SaveChanges(); Task<int> SaveChangesAsync(CancellationToken cancellationToken); } public class DataContext : DbContext, IDataContext { public DataContext(DbContextOptions options)

GeoAlchemy2: Get the lat, lon of a point

て烟熏妆下的殇ゞ 提交于 2019-12-06 05:41:14
Consider the following SQLAalchemy / GeoAlchemy2 ORM with a geometry field: from geoalchemy2 import Geometry, WKTElement class Item(Base): __tablename__ = 'item' id = Column(Integer, primary_key=True) ... geom = Column(Geometry(geometry_type='POINTZ', srid=4326)) When I update an item in the PostgreSQL shell: UPDATE item SET geom = st_geomFromText('POINT(2 3 0)', 4326) WHERE id = 5; Fetching the field: items = session.query(Item).\ filter(Item.id == 3) for item in items: print item.geom Gives: 01e9030000000000000000004000000000000008400000000000000000 This isn't a proper WKB - at least, it

WKT: how do you define Polygons with 3 rings (==2 holes)?

ε祈祈猫儿з 提交于 2019-12-05 23:54:09
问题 I found in here this document. I read it but I keep wondering how to define a Polygon with 3 rings in WKT? 回答1: You can use either the POLYGON or the MULTIPOLYGON type, but make sure the outer container ring is listed first followed by the inner hole rings. The orientations of the inner rings are not important since holes are explicit in the syntax. X & Y are space separated, coordinates are comma separated, and ring extents are limited by parentheses and separated by commas. Polygons (outer

WKT: how do you define Polygons with 3 rings (==2 holes)?

二次信任 提交于 2019-12-04 04:29:29
I found in here this document. I read it but I keep wondering how to define a Polygon with 3 rings in WKT ? You can use either the POLYGON or the MULTIPOLYGON type, but make sure the outer container ring is listed first followed by the inner hole rings. The orientations of the inner rings are not important since holes are explicit in the syntax. X & Y are space separated, coordinates are comma separated, and ring extents are limited by parentheses and separated by commas. Polygons (outer ring plus any inner rings) are also limited by parentheses. Finally, inner rings cannot cross each other,

How to handle WKT data in Android?

天涯浪子 提交于 2019-11-28 02:08:51
问题 I have data in this format: POINT(73.0166738279393 33.6788721326803) MULTILINESTRING((73.0131224998036 33.679001500419,73.0119635003153 33.678392400389,73.0119205001311 33.6783781002692),(73.0131224998036 33.679001500419,73.0136031002029 33.6783443999742),(73.0136031002029 33.6783443999742,73.0147099372139 33.67685138958),(73.0147099372139 33.67685138958,73.0150124997272 33.6770292997624,73.0154158996241 33.6773507003746,73.0157677998441 33.6776577999676,73.016042399737 33.6779721004322,73