geography

How to event listen and programatically highlight specific regions of my India map?

我们两清 提交于 2019-12-12 01:57:09
问题 I want the map of India and the list with text for the regions to listen to each other so that when the mouse pointer is hovering above a region then the corresponding region name gets underlined, and similarly if I hover over the name of the region to the left then the corresponding area on the map should be highlighted with the pink color. Can you help me? I can add code to listen for the hover event, but I'm not sure how to programmatically highlight the regions? I can listen for clicking

d3 toposjon map troubleshooting … why does it look like all zig zags and shards?

耗尽温柔 提交于 2019-12-11 12:13:59
问题 UPDATE: solved, kind of. I spent some time learning ogr2ogr and topojson and made a topojson that works beautifully in D3. I'm not sure why the file spit out by mapshaper.org turned into shards in my hands; on their site, the file displays fine. ORIGINAL POST: There may be an answer out there, but how do you ask google "why does my d3 map look like zig zags and shards?" FWIW, "search by image" turned up nothing. ;) I suspect it's something with wrong projection or wrong conversion from

Advanced search with distances using NHibernate and SQL Server Geography

旧城冷巷雨未停 提交于 2019-12-11 04:57:17
问题 I've got an existing advanced search method in a repository that checks a FormCollection for the existence of search criteria, and if present, adds a criterion to the search e.g. public IList<Residence> GetForAdvancedSearch(FormCollection collection) { var criteria = Session.CreateCriteria(typeof(Residence)) .SetResultTransformer(new DistinctRootEntityResultTransformer()); if (collection["MinBedrooms"] != null) { criteria .Add(Restrictions.Ge("Bedrooms", int.Parse(collection["MinBedrooms"])))

How to restrict app usability to a certain geographical area ANDROID

半腔热情 提交于 2019-12-10 14:48:25
问题 I want to define a geographical boundary outside of which, the app will refuse to work. I already know how to do this with a square bound by two lat/long pairs: if ((dLAT.doubleValue() > 35.309171) || (dLAT.doubleValue() < 35.226442) || (dLON.doubleValue() < -92.790165) || (dLON.doubleValue() > -92.707081)) { LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(this); localBroadcastManager.sendBroadcast(new Intent("killapp")); } I also know about geofencing... or

SQL Server : Geography search performance - query nearest stores

萝らか妹 提交于 2019-12-10 13:53:27
问题 I have a performance query nearest stores: We have a table that contains around 50,000 records (stores/point of sale locations) in one country. Each record has location columns of type "geography" [LOCATION_geo] [geography] Also for performance I created a SPATIAL INDEX over that location column using this syntax CREATE SPATIAL INDEX [LOCATION_geoIndex] ON [dbo].[StoreLocations] ([LOCATION_geo]) USING GEOGRAPHY_GRID WITH ( GRIDS =(LEVEL_1 = MEDIUM,LEVEL_2 = MEDIUM,LEVEL_3 = MEDIUM,LEVEL_4 =

SQL Server 2008 Geography .STBuffer() distance measurement units

心不动则不痛 提交于 2019-12-10 03:07:05
问题 I'm working with a geographic point using lat/long and need to find other points in our database within a 5 mile radius of that point. However, I can't seem to find out what the "units" are for STBuffer, it doesn't seem to conform to feet, miles, meters, kilometers, etc. The documentation only refers to them as "units", any suggestions? Thanks [...] from geography::STGeomFromText('POINT(x y)', 4326).STBuffer(z).STIntersects(geography::STGeomFromText('POINT(' + CAST(v.Longitude as varchar(max)

Geography data type vs. Geometry data type in SQL Server

荒凉一梦 提交于 2019-12-09 20:29:50
问题 Environment: SQL Server 2012 I'm using an online tool, the only one I could find so far, to plot polygons and points on the earth. http://www.birdtheme.org/useful/googletool.html I have two tables. One stores "areas" as polygons and the other table stores points amongst other things irrelevant to my question. For simplicity, I'll just reduce my scenario to sql variables. In the query below, I'm using the geography data type for well known points of interest. I drew a polygon around Robben

Sql Server 2008 geography LineString size limitations

懵懂的女人 提交于 2019-12-09 01:08:46
问题 today i ran into a possible size limitation of geography type Linestrings within Sql Server 2008. when i create a Linestring with STGeomFromText() that contains 567 points containing Long,Lat and Z coordinates, everything works fine. However, if i add one more point to the linestring i get an: ArgumentException 24200: The specified input does not represent a valid geography instance. I was not able to find any documentation regarding size limitations of sql server´s geography type linestrings

Cities to Metropolitan areas

痞子三分冷 提交于 2019-12-08 18:38:27
I have a database of cities (in both the US and the rest of the world). The database entries are simple text strings. Currently the database contains even small cities (population 10,000). I wish to use a larger scale database instead, by assigning the cities into larger geographical\metropolitan areas. An example can be the Metropolitan areas in Google's AdWords API: http://code.google.com/intl/iw-IL/apis/adwords/docs/developer/adwords_api_us_metros.html but I have no problem using other databases instead. I'd be grateful for any advice on how this can be performed using existing databases

SQL Server Geography Point

≯℡__Kan透↙ 提交于 2019-12-08 05:06:27
问题 I have recently been researching the SQL Server spatial data types and have decided to try and store my long, lat points in a geography field. However I cannot figure out how to insert the data into the field, I have tried using stuff like "POINT(double, double), 0" and weird stuff like that, but no success. Also im curious as to what the purpose of the ID argument specified in the geography functions. Thanks, Alex. 回答1: Have you looked at the examples from MSDN? From geography (Transact-SQL)