Giter Club home page Giter Club logo

spatiallite's People

Contributors

lukaskabrt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

spatiallite's Issues

IDs stored as int instead of long

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

Bug in CalculateBearing in Sphere2DCalculator

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;
}

Type of the referenced entity doesn't match type of the entity in the collection.

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.