shp4s


License

License

GroupId

GroupId

works.worace
ArtifactId

ArtifactId

shp4s_2.13
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

shp4s
shp4s
Project URL

Project URL

https://github.com/worace/shp4s
Project Organization

Project Organization

works.worace
Source Code Management

Source Code Management

https://github.com/worace/shp4s

Download shp4s_2.13

How to add to project

<!-- https://jarcasting.com/artifacts/works.worace/shp4s_2.13/ -->
<dependency>
    <groupId>works.worace</groupId>
    <artifactId>shp4s_2.13</artifactId>
    <version>0.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/works.worace/shp4s_2.13/
implementation 'works.worace:shp4s_2.13:0.0.1'
// https://jarcasting.com/artifacts/works.worace/shp4s_2.13/
implementation ("works.worace:shp4s_2.13:0.0.1")
'works.worace:shp4s_2.13:jar:0.0.1'
<dependency org="works.worace" name="shp4s_2.13" rev="0.0.1">
  <artifact name="shp4s_2.13" type="jar" />
</dependency>
@Grapes(
@Grab(group='works.worace', module='shp4s_2.13', version='0.0.1')
)
libraryDependencies += "works.worace" % "shp4s_2.13" % "0.0.1"
[works.worace/shp4s_2.13 "0.0.1"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.13.1
works.worace : shp4s-core_2.13 jar 0.0.1

test (1)

Group / Artifact Type Version
org.scalameta : munit_2.13 jar 0.7.1

Project Modules

There are no modules declared in this project.

shp4s - Pure Scala Shapefile Codec

Based on scodec and fs2.

import cats.effect.{IO, ContextShift}
import works.worace.shp4s

implicit val csIO: ContextShift[IO] =
  IO.contextShift(scala.concurrent.ExecutionContext.Implicits.global)

// Read features into Vector
shp4s.Core.readAllSync("test.shp")

// fs2.Stream[IO, Feature]
streamShapefile(path: String)

Types - 14

  • NullShape
  • Point
  • PolyLine
  • Polygon
  • MultiPoint
  • PointZ
  • PolylineZ
  • PolygonZ
  • MultiPointZ
  • PointM
  • PolyLineM
  • PolygonM
  • MultiPointM
  • MultiPatch
  • DBF
  • DBF proper resource handling (cats bracket? closing in finally?)

TODO Edge Cases

  • Verify PointZ file with M values
  • Verify MultiPointZ with M values
  • Convert MultiPointZ to hold Vector[PointZ] values
  • PolylineZ with M Values
  • *-Z encoding with empty M values -- should omit entirely rather than encoding 0's
  • PolyLineZ Sample File

Releasing

  • no version setting in build.sbt
  • push a git tag (e.g. v0.0.1) to release a version
  • other commits to master will be pushed as snapshots

Versions

Version
0.0.1