geo

geotools等值线生成

匿名 (未验证) 提交于 2019-12-03 00:22:01
前文中,提到了 等值面 的生成,后面有人经常会问等值线的生成,本文在前文的基础上做了一点修改,完成了等值线的geotools生成。 package com.lzugis.geotools; import com.amazonaws.util.json.JSONObject; import com.lzugis.CommonMethod; import com.lzugis.geotools.utils.FeaureUtil; import com.lzugis.geotools.utils.GeoJSONUtil; import com.vividsolutions.jts.geom.Geometry; import org.geotools.data.FeatureSource; import org.geotools.data.shapefile.ShapefileDataStore; import org.geotools.data.simple.SimpleFeatureCollection; import org.geotools.data.simple.SimpleFeatureSource; import org.geotools.feature.FeatureCollection; import org.geotools.feature

Elasticsearch(GEO)数据写入和空间检索

匿名 (未验证) 提交于 2019-12-02 23:59:01
什么是 Elasticsearch? Elasticsearch 是一个开源的分布式 RESTful搜索和分析引擎,能够解决越来越多不同的应用场景。 本文主要是介绍了ES GEO数据写入和空间检索,ES版本为7.3.1 Qgis使用渔网工具,对范围进行切割,得到网格的Geojson def set_mapping ( es , index_name = "content_engine" , doc_type_name = "en" , my_mapping ={}): # ignore 404 and 400 es . indices . delete ( index = index_name , ignore =[ 400 , 404 ]) print ( "delete_index" ) # ignore 400 cause by IndexAlreadyExistsException when creating an index my_mapping = { "properties" : { "location" : { "type" : "geo_shape" }, "id" : { "type" : "long" } } } create_index = es . indices . create ( index = index_name ) mapping_index

多自由度机械臂模拟6

匿名 (未验证) 提交于 2019-12-02 23:55:01
模拟一个完整的吊装流程,初始状态->起臂->放下吊绳->竖直起吊->水平旋转->放下物体->收缩吊绳。 osg::ref_ptr<osg::Node> createSimple() { osg::ref_ptr<osg::Geode> geode = new osg::Geode; osg::ref_ptr<osg::Geometry> geo = new osg::Geometry; //申请一些顶点 osg::ref_ptr<osg::Vec3Array> vers = new osg::Vec3Array; geo->setVertexArray(vers.get()); #if 1 geo->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINE_LOOP, 0, 4));//创建一个线圈 #else geo->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS, 0, 4));//创建一个正方形 #endif //设置顶点 vers->push_back(osg::Vec3(-15, 3.0, -15)); vers->push_back(osg::Vec3(15, 3.0, -15)); vers->push_back(osg::Vec3

Elasticsearch 5.X系列不再支持geo_distance_range

匿名 (未验证) 提交于 2019-12-02 23:36:01
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u013476435/article/details/90675753 在使用es 5.3时,想使用geo_distance_range实现环形搜索。 geo_distance_range的介绍如下: 在使用时,想去将自己的数据导入到es中并添加上索引,这里我的位置字段是position。 JestResult jestResult = jestClient.execute(new CreateIndex.Builder("igomomemberinfo").build()); 然后再将index上添加indexMapping String mappingString = "{\"" + "igomomemberinfo" + "\":{\"properties\":{\"position\":{\"type\":\"geo_point\", \"index\":\"true\"}}}}"; PutMapping.Builder builder = new PutMapping.Builder("igomomemberinfo", "igomomemberinfo", mappingString); try { JestResult jestResult = jestClient

如何用Python制作3D动态航线图

匿名 (未验证) 提交于 2019-12-02 22:51:30
用于带有起点和终点信息的线数据的绘制,主要用于地图上的航线,路线的可视化。 GeoLines.add() 方法签名 1 add(name, data, 2 maptype='china', 3 symbol=None, 4 symbol_size=12, 5 border_color="#111", 6 geo_normal_color="#323c48", 7 geo_emphasis_color="#2a333d", 8 geo_cities_coords=None, 9 geo_effect_period=6, 10 geo_effect_traillength=0, 11 geo_effect_color='#fff', 12 geo_effect_symbol='circle', 13 geo_effect_symbolsize=5, 14 is_geo_effect_show=True, 15 is_roam=True, **kwargs) name -> str 图例名称 data -> [list], 包含列表的列表 数据项,数据中,每一行是一个『数据项』,每一列属于一个『维度』。每一行包含两个或三个数据,如 ["广州", "北京"] 或 ["广州", "北京",100],则指定从广州到北京。第三个值用于表示该 line 的数值,该值可省略。 maptype ->

【python】geoJson转换Shapefile

匿名 (未验证) 提交于 2019-12-02 22:51:30
#!/usr/bin/env python # -*- coding: utf-8 -*- # @File : C.py # @Author: huifer # @Date : 2018/5/22 0022 import gdal import osr import ogr a = { "type" : "FeatureCollection" , "features" : [ { "type" : "Feature" , "properties" : {}, "geometry" : { "type" : "Polygon" , "coordinates" : [ [ [ 3753081.9140625 , 66.79190947341796 ], [ 3753078.3984375 , 47.040182144806664 ], [ 3753120.9375 , 63.54855223203644 ], [ 3753086.8359375 , 71.85622888185527 ], [ 3753093.515625 , 64.62387720204688 ], [ 3753081.9140625 , 66.79190947341796 ] ] ] } }, { "type" : "Feature" , "properties" : {}, "geometry" : {

【Java】通过ip地址获取详细地域信息(不通过API使用本地库)

匿名 (未验证) 提交于 2019-12-02 21:45:52
MaxMind GeoIP2 服务能识别互联网用户的地点位置与其他特征,应用广泛,包括个性化定制内容、诈欺检测、广告定向、网站流量分析、执行规定、地理目标定位、地理围栏定位 (geo-fencing)以及数字版权管理。目前使用 GeoIP 更多是配合Nginx或Apache服务器进行日志分析获取网站访问量地域分布状况。 GeoIP 分为商业版和免费版,免费版比商业版精度差了许多,经测试对于城市定位确实有差距,能否接受看你的精度要求!(老板说免费的可以了,哈哈) 下载GeoIP2的库,这个库是经常更新的,如果数据要求很高的,需要经常更新(我们不高,预计一年一次) 但是好像网站不太稳定,我这边3个都下载好了,可【点击下载】 关于Java如何使用 不用担心,已经有开源库,maven下载一个 <dependency> <groupId>com.maxmind.geoip2</groupId> <artifactId>geoip2</artifactId> <version>2.12.0</version> </dependency> 没有maven,怎么办?不怕,我上传了,可【点击下载】 使用用到的工具类 import com.maxmind.geoip2.DatabaseReader; import com.maxmind.geoip2.model.AsnResponse; import

Querying for things near a geolocation?

£可爱£侵袭症+ 提交于 2019-12-02 18:37:42
I have a query that attempts to find things within a certain geolocation, but the results that it brings back are a little bit... strange. I had previously posted this thread and the community helped me find a formula that I needed: Querying within longitude and latitude in MySQL but the query now gives really wacky results. My data is surrounding the city of San Francisco which has the lat/lng 37.780182 , -122.517349 Query: SELECT id, hike_title, lat, lng, ( 3959 * acos( cos( radians(37) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians(37.780182) ) + sin( radians(-122.517349) ) * sin

Calculate distance between 2 lat longs

末鹿安然 提交于 2019-12-02 08:30:18
问题 I have 4 columns in my data frame lat1,long1...lat2,long2. I need to calculate distance between these pairs. I am trying to use Distm function. When I try to use distm (c(mydata2$lst_upd_longitude,mydata2$lst_upd_latitude), c(mydata2$long,mydata2$lat), fun = distHaversine) R throws up an error "Error in .pointsToMatrix(x) : Wrong length for a vector, should be 2" For now I am using the below code to calculate distance for every point. But I am sure there should be a better solution. Also this

Using ELKI's Distance Function

折月煮酒 提交于 2019-12-02 06:35:56
问题 This is a follow up from a previous question, where we commented that using euclidian distances with lat,long coordinates does not yeld correct results. I read in the documentation that ELKI enables geographic data, namely int its distance function, present in the various clustering algorithms. In the user interface of ELKI, I can see there are options to replace the default distance function (euclidian) by a better suited one. I also see that in that case, you need to provide a datum, which