我应该为我的MSc创建一个GIS应用程序,我想知道什么是最好的免费和(最好)开源技术?用于开发此类应用程序的编程语言是什么?
已知的选择是:数据库:PostgreSQL(PostGIS)(建议其他)
编程语言:PHP,Python,Java,...(建议其他)
框架:GeoDjango(如果使用Python或Jython),(建议其他)
客户端UI:JavaScript(OpenLayers),Flex,(建议其他)
服务器:Mapserver,Geoserver,Mapfish,(建议其他)
其他注意事项:Hibernate Spatial,支持移动GIS,(建议其他)
使用 svcutil,我尝试为遵循OGC CSW 2.0.2 (07-006r1)目录服务标准的Web 服务端点生成代理类。
我已经下载了整个 OGC 架构文件并将它们放入我的“D:/temp/OGCSchemas/”目录中。
我感兴趣的模式是 CSW,但是 CSW 模式包含并导入其他模式,这就是我下载整个集合的原因。
例如,您将看到如下内容:
<wsdl:import namespace="http://www.opengis.net/cat/csw/2.0.2/requests" location="./xml-interfaces.wsdl"/>
<xsd:schema targetNamespace="http://www.opengis.net/cat/csw/2.0.2" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="2.0.2">
<xsd:include schemaLocation="../../csw/2.0.2/CSW-discovery.xsd"/>
<xsd:include schemaLocation="../../csw/2.0.2/CSW-publication.xsd"/>
</xsd:schema>
Run Code Online (Sandbox Code Playgroud)
到目前为止,我的命令行看起来像:
svcutil D:\temp\OGCSchemas\csw\2.0.2\examples\wsdl\2.0.2\*.wsdl D:\temp\OGCSchemas\csw\2.0.2\*.xsd D:\temp\OGCSchemas\filter\1.1.0\*.xsd D:\temp\OGCSchemas\ows\1.0.0\*.xsd /out:D:\temp\ogc.csw.proxy.cs
Run Code Online (Sandbox Code Playgroud)
但是我收到了很多类似这样的错误:
Error: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://www.opengis.net/cat/csw/2.0.2/soap']/wsdl:binding[@name='csw-SO
AP']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.opengis.net/cat/csw/2.0.2/wsdl']/wsdl:service[@name='CSW']/
wsdl:port[@name='csw-SOAP-Port']
Run Code Online (Sandbox Code Playgroud)
我相信这个错误告诉我在我的命令行中包含更多的 xsds。
所以我的问题是:如何确定要在命令行中包含哪些 xsd?
我以为我已经为每个包含它的目录包含了一个 *.xsd,但显然不是。
编辑 #1 …
我有一些包含自相交多边形的空间数据(MapInfo文件)。这些会在我的处理过程中引起问题,特别是我无法在PostGIS中生成几何并集。有没有简单的方法可以解决此问题?如果有必要,我可以处理多面体。
我正在尝试使用JAXB来为该架构生成类:http : //schemas.opengis.net/wfs/1.1.0/wfs.xsd
我将该模式下载到本地文件,现在尝试生成JAXB类。首先我得到这个错误:
[ERROR] Property "Title" is already defined. Use <jaxb:property> to resolve this conflict.
line 261 of http://www.w3.org/1999/xlink.xsd
Run Code Online (Sandbox Code Playgroud)
经过一番谷歌搜索,我发现我需要使用一个绑定文件:
<jxb:bindings version="2.0" xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<jxb:bindings schemaLocation="http://www.w3.org/1999/xlink.xsd"
node="/xs:schema">
<jxb:bindings node="//xs:attributeGroup[@name='locatorAttrs']">
<jxb:bindings node=".//xs:attribute[@ref='xlink:title']">
<jxb:property name="title1" />
</jxb:bindings>
</jxb:bindings>
<jxb:bindings node="//xs:attributeGroup[@name='arcAttrs']">
<jxb:bindings node=".//xs:attribute[@ref='xlink:title']">
<jxb:property name="title2" />
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
<jxb:bindings
schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/geometryPrimitives.xsd"
node="/xs:schema">
<jxb:bindings node="//xs:element[@name='_Solid']">
<jxb:factoryMethod name="gmlAbstractSolidElementFactory" />
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
Run Code Online (Sandbox Code Playgroud)
但是,当我使用该绑定文件时,会遇到很多其他错误:
parsing a schema...
compiling a schema...
[ERROR] A class/interface with the same name "ncr.request.FeatureCollectionType" is already in use. Use a …Run Code Online (Sandbox Code Playgroud) 我有一个架构,我使用XML编辑器"扁平化".在我弄平它后,我得到验证错误.我该怎么办才能解决这个问题?
错误信息:
F [Xerces]元素或属性与QName生成不匹配:QName :: =(NCName':')?NCName.
码:
<xs:import namespace="http://www.opengis.net/gml"
schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"
xmlns:="http://www.opengis.net/gml/3.1.1" />
<xs:annotation xmlns:="http://www.opengis.net/sps/1.0">
<xs:documentation>
<copyright> SPS is an OGC Standard. Copyright (c)
2007,2010 Open Geospatial Consortium, Inc. All Rights Reserved. To
obtain additional rights of use, visit http://www.opengeospatial.org/legal/ .
</copyright>
</xs:documentation>
</xs:annotation>
Run Code Online (Sandbox Code Playgroud)
这是一个截图,可能更好地说明我的错误:

编辑:
以某种方式删除冒号.这种"扁平化"究竟应该做什么?
xsd的展平采用了包含大量包含的xsd,并将其全部放入一个文件中(没有任何包含).