Code Monkey home page Code Monkey logo

shapekit's People

Contributors

andreacremaschi avatar giladgo avatar grgcombs avatar mweisman avatar scspijker avatar snorf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

shapekit's Issues

Update podspec

Heya!

Could you please tag and update the podspec? The changes that you pulled from me are actually not in the podspec yet, so when I updated I lost my changes xD

Thanks!

Issue compiling with Apple LLVM 5.0 / XCode 5

XCode 5 dropped support for llvm-gcc, so the default compiler now is LLVM 5, and it seems to have some issues with geos: WKB geometry types are correctly identified, but when it comes to read coordinate values ( Geometry * WKBReader::readGeometry()::285) return values are incorrect.
This is a major issue since everything depends on geos..

Where can I leave this nice category?

I wrote this category for my self to use ShapeKitPolygon with MKMapView. However, I can't include it in the ShapeKit code (because that would make it dependent on the MapKit framework).

Can I put it somewhere? In the wiki, the readme, or maybe in a separate readme ("Using with MKMapView.md")?

Cheers

#import <Foundation/Foundation.h>
#import <ShapeKit.h>

@interface ShapeKitPolygon (MKPolygon)

- (MKPolygon*) MKPolygon;

@end

@implementation ShapeKitPolygon (MKPolygon)

// Recursive function
- (MKPolygon*) MKPolygon
{
    // Copies only the exterior ring!
    int numberOfCoordinates = [self numberOfCoords];
    CLLocationCoordinate2D coordinates[numberOfCoordinates];

    for (int i = 0; i < numberOfCoordinates; i++)
    {
        coordinates[i] = [self coordinateAtIndex: i];
    }

    // Copy the interior rings
    NSMutableArray *interiorMKPolys = [NSMutableArray array];
    for (ShapeKitPolygon *poly in self.interiors)
    {
        [interiorMKPolys addObject: [poly MKPolygon]];
    }

    return [MKPolygon polygonWithCoordinates:coordinates count:numberOfCoordinates interiorPolygons:interiorMKPolys];
}

@end

ShapeKitGeometry.h exposes GeomType, but not constants

ShapeKitGeometry exposes GeomType, but no constants to compare against.

Inside the ShapeKitFactory:55 (classForGeometry:) it uses not a GeomType but the GeomTypeId, maybe it is an idea to expose the GeomTypeId, and the corresponding enum GEOSGeomTypes in geos_c.h:122 ?

What would be the best way to expose the type of a Geometry, and also expose constants to compare against? I can implement this and make a pull request if you want.

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.