Does MapSuite 3.0 support T-WFS (transactional WFS)? I know it supports WFS but I want the ablility to do more than just pull from the WFS service. I would like to update shapes through that service.
T-WFS (transactional WFS)
Peter,
Thanks for your post and question.
I think we could easily implement the API to update features. Following is the sample code you could reference, while my editing logic is very simple, just scale it up by 2 of scaling factor.
In the service side:
[WebMethod]
public bool UpdateFeature(string featureId, string layerName)
{
FeatureLayer layer = GetLayer(layerName, ShapeFileReadWriteMode.ReadWrite);
bool result = false;
lock (layer)
{
try
{
layer.Open();
Feature targetFeature = layer.QueryTools.GetFeatureById(featureId, new Collection<string>());
BaseShape baseSahpe = targetFeature.GetShape();
baseSahpe.ScaleTo(2);
baseSahpe.Id = featureId;
targetFeature = new Feature(baseSahpe);
layer.EditTools.BeginTransaction();
layer.EditTools.Update(targetFeature);
TransactionResult transactionResult = layer.EditTools.CommitTransaction();
if(transactionResult.TotalFailureCount == 0)
{
result = true;
}
}
finally
{
layer.Close();
}
}
return result;
}
In the client side,we can use it like this:
bool success = featureServiceSoapClient.UpdateFeature("135", "World");
Any more questions just feel free to let me know.
Thanks.
Yale
I was thinking more OGC WFS-T communication
Here is a link
opengeospatial.org/standards/wfs
The WFS-T section is called Web Feature Service (Transactional) (1.0.0)
I was wondering if these type of calls are possible using the WfsFeatureLayer class or some other Wfs class in ThinkGeo.
I know I can get features using the WfsFeatureLayer class but that is just WFS and not WFS-T.
My overall goal is if ThinkGeo can support WFS-T calls then I can talk to ArcGIS and edit features. I can pull features from ESRI ArcGIS using the WfsFeatureLayer class now.
Peter,
We do not have the feature at the moment but that is something I think we could add. Let us review the specification for a bit. The issue is if we can do it in a few days then we can have one team do it and that is easy to schedule. If on the other had it is larger then it goes through a different process and these kind of enhancements have a larger turnaround as they are scheduled possibly behind many other features.
Just so I fully cover things, the other option is if we find it is a larger item and we decide to schedule it in the further future then you always have the option to use our professional services to have people work on it now. This gives you the option to have the work done ASAP when we might otherwise prioritize it behind some other things.
And some extra information… We are in the process of developing an online issues system where you can enter issues, people can vote and you can get some real insight into what is on the horizon. We are a little ways out from that but it is the direction we are moving. Currently our issues system is internal and not really setup to share.
David
Hi,
I know this is a crazy old post. But wondering if anyone knows if there’s been any advances here? We are looking at attempting to do some updates on a WFS service and would prefer not to have to write the update code ourselves if we could avoid it.
I did check the WFSFEatureLayer (version 7.0) via:
var canSave = layer.EditTools.IsEditable;
and it seems that editing is not an option (although this maybe because the layer we are binding too isn’t editable, our client hasn’t set up an editable layer yet.)
Thanks in advance for anyone’s help :)
Cheers,
Neil.
Hi Neil,
Sorry to say Map Suite still don’t support the feature and currently, I am afraid you need to implement it by yourselves.
Just let you know I also have posted the new feature in our issues system so that we can notice it and implement it in the future. Also, you can create an enhancement topic and vote it in our enhancement tracking system: helpdesk.thinkgeo.com/EnhancementTracker
Here is the WFS specification and hope it helps: opengeospatial.org/standards/wfs
Sorry for any inconvenience.
Regards,
Troy
Cheers Troy, thanks for the authoritative answer.
Neil,
Hi Neil,
You are always welcome, if you have any more question, please feel free to let us know.
Best Regards
Summer