lukaskabrt / spatiallite Goto Github PK
View Code? Open in Web Editor NEWSpatialLITE is lightweight .NET Core library for spatial data processing.
License: MIT License
SpatialLITE is lightweight .NET Core library for spatial data processing.
License: MIT License
What steps will reproduce the problem?
1. Read an OSM file (my test was against a .PBF file) that has an entity with an ID > 2^31
What is the expected output? What do you see instead?
IEntityInfo.ID should be a long (Int64) - it is currently int (Int32).
Entities with ID > 2^31 result in overflow errors (i.e. negative IDs).
What version of the product are you using? On what operating system?
SpatialLITE_1.1.0 on Windows 7x64, .NET 4.5
Please provide any additional information below.
Negative Int64 IDs are often used locally to indicate additions that have not been submitted to the OSM databases.
Original issue reported on code.google.com by [email protected]
on 2 Jul 2013 at 2:42
Bearings are calculated wrong. The right code should be as follows (according to this formular ):
private double CalculateBearing(Coordinate c1, Coordinate c2)
{
double dLon = Math.Abs(c2.X - c1.X) * Math.PI / 180;
double y = Math.Sin(dLon) * Math.Cos(c2.Y * Math.PI / 180);
double x = Math.Cos(c1.Y * Math.PI / 180) * Math.Sin(c2.Y * Math.PI / 180) -
(Math.Sin(c1.Y * Math.PI / 180) * Math.Cos(c2.Y * Math.PI / 180) * Math.Cos(dLon));
double bearing = Math.Atan2(y, x);
return bearing;
}
The polygon geometry constructor takes an CoordinateList for the exteriorRing argument. Internally needed is "only" a ICoordinateList.
What steps will reproduce the problem?
1. Create empty project (VS2010).
2. Add reference assemblies from 0.1.0.0 download.
3. Add example code to your project and specify the correct directory and file
name for your osm.pbf file.
4. Run the program. Exception thrown on 11MG pbf (district of columbia) during
the following function:
string fileName = "C:\\maps\\distofcol.osm.pbf";
OsmReaderSettings readerSettings = new OsmReaderSettings() { ReadMetadata = false };
using (PbfReader reader = new PbfReader(fileName, readerSettings))
{
db = OsmGeometryDatabase.Load(reader, true);
}
What is the expected output? What do you see instead?
The pbf binary should successfully import. Once this is complete the example
code is supposed to compute highway length from way data and log it to the
console. I have been able to import a smaller pbf (hawaii ~7MB), however it
will not compute the length properly.
What version of the product are you using? On what operating system?
0.1.0.0, Visual Studio 2010, Windows 7 x64
Please provide any additional information below.
InnerException: System.ArgumentException
Message=Type of the referenced entity doesn't match type of the entity in the collection.
Source=SpatialLite.Osm
StackTrace:
at SpatialLite.Osm.Geometries.RelationMember.FromRelationMemberInfo(RelationMemberInfo info, IEntityCollection`1 entities, Boolean throwOnMissing) in D:\___PROJECTS___\SpatialLITE\SpatialLITE\src\SpatialLite.Osm\Geometries\RelationMember.cs:line 116
at SpatialLite.Osm.Geometries.OsmGeometryDatabase.Load(IOsmReader reader, Boolean ignoreReferentialErrors) in D:\___PROJECTS___\SpatialLITE\SpatialLITE\src\SpatialLite.Osm\Geometries\OsmGeometryDatabase.cs:line 74
at DisplayAndRoute.MainWindow.importFile() in C:\Users\crussell\Documents\Visual Studio 2010\Projects\MappingMadness\DisplayAndRoute\MainWindow.xaml.cs:line 86
at DisplayAndRoute.MainWindow..ctor() in C:\Users\crussell\Documents\Visual Studio 2010\Projects\MappingMadness\DisplayAndRoute\MainWindow.xaml.cs:line 74
Original issue reported on code.google.com by [email protected]
on 27 Jul 2012 at 8:06
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.