This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def foo: Parser[Tuple2] = ("Name:" ~> name) ~ ("Amount:" ~> money) ^^ { case n ~ a => (n, a) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> import org.geoscript._ | |
import org.geoscript._ | |
scala> import GeoScript._ | |
import GeoScript._ | |
scala> val pg = workspace.Postgis("database" -> "pg_test") | |
pg: org.geoscript.workspace.Workspace = <Workspace: {port=5432, passwd=, dbtype=postgis, host=localhost, charset=utf-8, user=postgres, database=pg_test}> | |
scala> val statesShp = layer.Shapefile("geoscript/src/test/resources/data/states.shp") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run in the geoserver webapp dir: | |
cd geoserver/src/web/app/ | |
# If you use SVN | |
rm -rf /tmp/release | |
svn export ../../../data/release/ /tmp/release/ | |
mvn jetty:run -DGEOSERVER_DATA_DIR=/tmp/release/ | |
# if you use git-svn | |
git clean -xdf -- ../../../data/release/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val pg = Postgis(params) | |
val shp = Shapefile("/path/to/file") | |
val pg_layer = pg.create("foo", shp.schema.fields) | |
pg_layer ++= shp.map(f => f.update("geom" -> f.get("geom").buffer(10))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.Graphics2D; | |
import java.awt.Rectangle; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.net.URL; | |
import javax.imageio.ImageIO; | |
import org.geotools.data.FeatureSource; | |
import org.geotools.data.shapefile.ShapefileDataStore; | |
import org.geotools.factory.CommonFactoryFinder; | |
import org.geotools.geometry.jts.ReferencedEnvelope; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<StyledLayerDescriptor version="1.0.0"> | |
<NamedLayer> | |
<Name>Rivers</Name> | |
<NamedStyle> | |
<Name>CenterLine</Name> | |
</NamedStyle> | |
</NamedLayer> | |
<NamedLayer> | |
<Name>Roads</Name> | |
<NamedStyle> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<sld:UserStyle xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"> | |
<sld:Name>Default Styler</sld:Name> | |
<sld:Title/> | |
<sld:FeatureTypeStyle> | |
<sld:Name>name</sld:Name> | |
<sld:Rule> | |
<ogc:Filter> | |
<ogc:Or> | |
<ogc:Or> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.util.parsing.combinator.{ Parsers, RegexParsers } | |
import scala.util.parsing.input.{ CharSequenceReader, Reader } | |
object ParsingExample extends Parsers { | |
override type Elem = Char | |
object Delimiter extends Parser[String] { | |
def apply(reader: Input): ParseResult[String] = { | |
if (reader atEnd) { | |
Failure("end of string", reader) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
........................................................E............. | |
====================================================================== | |
ERROR: /data/search/detail -> Test accessing the data search detail for a layer | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/dwins/geonode-git/src/GeoNodePy/geonode/maps/tests.py", line 68, in test_search_detail | |
response = c.get('/data/search/detail', {'uuid':layer.uuid}) | |
File "/home/dwins/geonode-git/lib/python2.6/site-packages/django/test/client.py", line 290, in get | |
response = self.request(**r) | |
File "/home/dwins/geonode-git/lib/python2.6/site-packages/django/core/handlers/base.py", line 100, in get_response |
OlderNewer